diff options
author | Wayne Davison <wayned@samba.org> | 2011-03-26 09:59:14 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2011-03-26 10:09:20 -0700 |
commit | 78286a03d196efeed754aa4c1faa571f5dbea342 (patch) | |
tree | 6ba67b8ae2397f5a55278f5a7041d9b0a9d2d197 /receiver.c | |
parent | d699d815d6acdf18f73788c21f3be5e6611cfecf (diff) | |
download | rsync-78286a03d196efeed754aa4c1faa571f5dbea342.tar.gz |
Avoid re-setting (and sending) xattrs on a hard-linked file w/the same xattrs.
Improved the xattrs testing to include hard-linking.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -548,14 +548,16 @@ int recv_files(int f_in, int f_out, char *local_name) rprintf(FINFO, "recv_files(%s)\n", fname); #ifdef SUPPORT_XATTRS - if (iflags & ITEM_REPORT_XATTR && do_xfers) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers + && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) recv_xattr_request(file, f_in); #endif if (!(iflags & ITEM_TRANSFER)) { maybe_log_item(file, iflags, itemizing, xname); #ifdef SUPPORT_XATTRS - if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) + if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers + && !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) set_file_attrs(fname, file, NULL, fname, 0); #endif if (iflags & ITEM_IS_NEW) { |