From: Wayne Davison Date: Wed, 31 Dec 2014 19:02:03 +0000 (-0800) Subject: Call set_modtime even if only NSEC is different. X-Git-Tag: v3.1.2pre1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b34561cf77962fe1286a5cb20f6bc25f7b6e345;p=thirdparty%2Frsync.git Call set_modtime even if only NSEC is different. --- diff --git a/rsync.c b/rsync.c index c498c44f..68ff6b10 100644 --- a/rsync.c +++ b/rsync.c @@ -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",