Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix misleading --force documentation (bug 6752)
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
d8bc469
..
c84e8e8
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-435,7
+435,7
@@
int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
flags |= ATTRS_SKIP_MTIME;
if (!(flags & ATTRS_SKIP_MTIME)
&& cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
flags |= ATTRS_SKIP_MTIME;
if (!(flags & ATTRS_SKIP_MTIME)
&& cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
- int ret = set_modtime(fname, file->modtime, sxp->st.st_mode);
+ int ret = set_modtime(fname, file->modtime,
F_MOD_NSEC(file),
sxp->st.st_mode);
if (ret < 0) {
rsyserr(FERROR_XFER, errno, "failed to set times on %s",
full_fname(fname));
if (ret < 0) {
rsyserr(FERROR_XFER, errno, "failed to set times on %s",
full_fname(fname));
@@
-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 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
#endif
#ifdef HAVE_CHMOD