Skip to content

Commit

Permalink
Call set_modtime even if only NSEC is different.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Dec 31, 2014
1 parent 5546dab commit 5b34561
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5b34561

Please sign in to comment.