X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/f31850966f7f60b8c58fa44d6948044571c060f6..7462c6ac39d86cb8252ec47246569e3ddda35b6a:/generator.c diff --git a/generator.c b/generator.c index 0ac86426..2ae88dbe 100644 --- a/generator.c +++ b/generator.c @@ -697,8 +697,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre if (iflags & ITEM_XNAME_FOLLOWS) write_vstring(sock_f_out, xname, strlen(xname)); #ifdef SUPPORT_XATTRS - if (iflags & ITEM_REPORT_XATTR && !dry_run) - send_xattr_request(NULL, file, sock_f_out); + if (preserve_xattrs && !dry_run + && iflags & (ITEM_REPORT_XATTR|ITEM_TRANSFER)) { + send_xattr_request(NULL, file, + iflags & ITEM_REPORT_XATTR ? sock_f_out : -1); + } #endif } else if (ndx >= 0) { enum logcode code = logfile_format_has_i ? FINFO : FCLIENT;