extern int file_extra_cnt;
@@ -379,7 +380,7 @@ int push_pathname(const char *dir, int len)
extern int file_extra_cnt;
@@ -379,7 +380,7 @@ int push_pathname(const char *dir, int len)
- static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ndx)
+ static void send_file_entry(int f, const char *fname, struct file_struct *file, int ndx, int first_ndx)
{
- static time_t modtime;
+ static time_t modtime, atime;
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
{
- static time_t modtime;
+ static time_t modtime, atime;
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
-@@ -487,6 +488,13 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
+@@ -457,6 +458,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
-@@ -559,6 +567,8 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
+@@ -529,6 +537,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
-@@ -645,7 +655,7 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
+@@ -615,7 +625,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
-@@ -778,6 +788,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -749,6 +759,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -907,6 +927,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -878,6 +898,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
-@@ -1244,6 +1266,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1215,6 +1237,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
F_OWNER(file) = st.st_uid;
if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
F_GROUP(file) = st.st_gid;
F_OWNER(file) = st.st_uid;
if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
F_GROUP(file) = st.st_gid;
-@@ -642,6 +643,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -645,6 +646,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
: iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
iflags |= ITEM_REPORT_TIME;
: iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
iflags |= ITEM_REPORT_TIME;
-@@ -999,6 +1003,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -1002,6 +1006,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
if (link_dest) {
if (!hard_link_one(file, fname, cmpbuf, 1))
goto try_a_copy;
if (link_dest) {
if (!hard_link_one(file, fname, cmpbuf, 1))
goto try_a_copy;
if (preserve_hard_links && F_IS_HLINKED(file))
finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
if (!maybe_ATTRS_REPORT && (verbose > 1 || stdout_format_has_i > 1)) {
if (preserve_hard_links && F_IS_HLINKED(file))
finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
if (!maybe_ATTRS_REPORT && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1184,6 +1190,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1187,6 +1193,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
-@@ -2009,7 +2018,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2017,7 +2026,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
STRUCT_STAT st;
if (link_stat(fname, &st, 0) == 0
&& cmp_time(st.st_mtime, file->modtime) != 0)
STRUCT_STAT st;
if (link_stat(fname, &st, 0) == 0
&& cmp_time(st.st_mtime, file->modtime) != 0)