X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1b502f3ec234bf1045c6bb146f64734d09e81956..ee1c00fea8647356e403368fad9ad4c909e9ef08:/rsync.c diff --git a/rsync.c b/rsync.c index db7abcc5..c84e8e8d 100644 --- a/rsync.c +++ b/rsync.c @@ -497,8 +497,10 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, * If set_acl() changes permission bits in the process of setting * an access ACL, it changes sxp->st.st_mode so we know whether we * need to chmod(). */ - if (preserve_acls && !S_ISLNK(new_mode) && set_acl(fname, file, sxp) == 0) - updated = 1; + if (preserve_acls && !S_ISLNK(new_mode)) { + if (set_acl(fname, file, sxp, new_mode) > 0) + updated = 1; + } #endif #ifdef HAVE_CHMOD