diff options
author | Wayne Davison <wayned@samba.org> | 2014-12-31 11:02:03 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2014-12-31 13:10:37 -0800 |
commit | 5b34561cf77962fe1286a5cb20f6bc25f7b6e345 (patch) | |
tree | 353a784fcf22c83631128649bfabdeef3058326b | |
parent | 5546dab32970955e77ef7a5886bcd8fb765a25bf (diff) | |
download | android_external_rsync-5b34561cf77962fe1286a5cb20f6bc25f7b6e345.tar.gz android_external_rsync-5b34561cf77962fe1286a5cb20f6bc25f7b6e345.tar.bz2 android_external_rsync-5b34561cf77962fe1286a5cb20f6bc25f7b6e345.zip |
Call set_modtime even if only NSEC is different.
-rw-r--r-- | rsync.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -548,7 +548,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, || (!(preserve_times & PRESERVE_LINK_TIMES) && S_ISLNK(sxp->st.st_mode))) flags |= ATTRS_SKIP_MTIME; if (!(flags & ATTRS_SKIP_MTIME) - && cmp_time(sxp->st.st_mtime, file->modtime) != 0) { + && (sxp->st.st_mtime != file->modtime +#ifdef ST_MTIME_NSEC + || (NSEC_BUMP(file) && (uint32)sxp->st.ST_MTIME_NSEC != F_MOD_NSEC(file)) +#endif + )) { 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", |