--- rsync.c.orig 2006-01-09 12:35:38.000000000 -0600
+++ rsync.c 2006-01-09 12:35:51.000000000 -0600
extern int daemon_log_format_has_i;
extern struct stats stats;
+extern int extended_attributes;
int ok_to_set_time, int overwriting_basis)
+ char fnamereal[MAXPATHLEN];
/* The file was moved into place (not copied), so it's done. */
+ goto do_fix_extfile_mtime;
set_perms(fname, file, NULL, ok_to_set_time ? 0 : PERMS_SKIP_MTIME);
+ /* JDB: When rsync'ing data with extended attributes TO a machine
+ supporting copyfile, moving the synthetic file into place will
+ change the mtime of the 'real' file. Since the code in generator.c
+ guarantees that the synthetic file will be transferred after the
+ real file, it is sufficient (although kludgy) to re-adjust
+ the mtime of the real file here. */
+ if (extended_attributes) {
+ if (!strncmp(basename(fname), "._", 2) && ok_to_set_time) {
+ snprintf(fnamereal, MAXPATHLEN, "%s/%s",
+ dirname(fname), basename(fname) + 2);
+ if (set_modtime(fnamereal, file->modtime) != 0) {
+ rsyserr(FERROR, errno, "failed to set times for real file of %s",