Merge pull request #3394 from Arxisos/master
synced_folders/rsync: enable override of default chmod flag
This commit is contained in:
commit
12ac7bc132
|
@ -72,9 +72,14 @@ module VagrantPlugins
|
|||
args = Array(opts[:args]) if opts[:args]
|
||||
args ||= ["--verbose", "--archive", "--delete", "-z"]
|
||||
|
||||
# On Windows, we have to set the chmod flag to avoid permission issues
|
||||
if Vagrant::Util::Platform.windows?
|
||||
# On Windows, we have to set a default chmod flag to avoid permission issues
|
||||
if Vagrant::Util::Platform.windows? && !args.any? { |arg| arg.start_with?("--chmod=") }
|
||||
#Ensures that all non-masked bits get enabled
|
||||
args << "--chmod=ugo=rwX"
|
||||
|
||||
#Remove the -p option if --archive is enabled (--archive equals -rlptgoD)
|
||||
#otherwise new files will not have the destination-default permissions
|
||||
args << "--no-perms" if (args.include? "--archive") || (args.include? "-a")
|
||||
end
|
||||
|
||||
# Build up the actual command to execute
|
||||
|
|
Loading…
Reference in New Issue