Don't set ITEM_REPORT_TIME when a hard-linked file is already
authorWayne Davison <wayned@samba.org>
Thu, 9 Jun 2005 21:57:45 +0000 (21:57 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 9 Jun 2005 21:57:45 +0000 (21:57 +0000)
linked up as it should be and --times was not enabled.

generator.c

index b074455..c061386 100644 (file)
@@ -323,7 +323,8 @@ void itemize(struct file_struct *file, int ndx, int statret, STRUCT_STAT *st,
                            : S_ISDIR(file->mode) ? !omit_dir_times
                            : !S_ISLNK(file->mode);
 
-                       if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time)
+                       if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
+                            && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                            || (keep_time && file->modtime != st->st_mtime))
                                iflags |= ITEM_REPORT_TIME;
                        if (preserve_perms && file->mode != st->st_mode)