- offset = 0;
- f_name(file, fname + offset);
- if (remove_source_files) {
- if (do_unlink(fname) == 0) {
- if (verbose > 1)
- rprintf(FINFO, "sender removed %s\n", fname + offset);
- } else
- rsyserr(FERROR, errno, "sender failed to remove %s", fname + offset);
- }
+ rsyserr(FERROR, errno, "sender failed to remove %s", fname);
+}
+
+static void write_ndx_and_attrs(int f_out, int ndx, int iflags,
+ const char *fname, struct file_struct *file,
+ uchar fnamecmp_type, char *buf, int len)
+{
+ write_ndx(f_out, ndx);
+ if (protocol_version < 29)
+ return;
+ write_shortint(f_out, iflags);
+ if (iflags & ITEM_BASIS_TYPE_FOLLOWS)
+ write_byte(f_out, fnamecmp_type);
+ if (iflags & ITEM_XNAME_FOLLOWS)
+ write_vstring(f_out, buf, len);
+#ifdef SUPPORT_XATTRS
+ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && !dry_run)
+ send_xattr_request(fname, file, f_out);
+#endif