diff options
Diffstat (limited to 'src/copy.c')
-rw-r--r-- | src/copy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/copy.c b/src/copy.c index 2558fea14..16aed036d 100644 --- a/src/copy.c +++ b/src/copy.c @@ -1151,6 +1151,11 @@ preserve_metadata: if (set_acl (dst_name, dest_desc, x->mode) != 0) return_val = false; } + else if (x->explicit_no_preserve_mode) + { + set_acl (dst_name, dest_desc, 0666 & ~cached_umask ()); + return_val = false; + } else if (omitted_permissions) { omitted_permissions &= ~ cached_umask (); @@ -2570,6 +2575,11 @@ copy_internal (char const *src_name, char const *dst_name, if (set_acl (dst_name, -1, x->mode) != 0) return false; } + else if (x->explicit_no_preserve_mode) + { + if (set_acl (dst_name, -1, 0777 & ~cached_umask ()) != 0) + return false; + } else { if (omitted_permissions) |