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 /sender.c | |
parent | d699d815d6acdf18f73788c21f3be5e6611cfecf (diff) | |
download | android_external_rsync-78286a03d196efeed754aa4c1faa571f5dbea342.tar.gz android_external_rsync-78286a03d196efeed754aa4c1faa571f5dbea342.tar.bz2 android_external_rsync-78286a03d196efeed754aa4c1faa571f5dbea342.zip |
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 'sender.c')
-rw-r--r-- | sender.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -155,7 +155,8 @@ static void write_ndx_and_attrs(int f_out, int ndx, int iflags, if (iflags & ITEM_XNAME_FOLLOWS) write_vstring(f_out, buf, len); #ifdef SUPPORT_XATTRS - if (preserve_xattrs && 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))) send_xattr_request(fname, file, f_out); #endif } @@ -236,7 +237,8 @@ void send_files(int f_in, int f_out) rprintf(FINFO, "send_files(%d, %s%s%s)\n", ndx, path,slash,fname); #ifdef SUPPORT_XATTRS - if (preserve_xattrs && 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 |