Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed several issues with preserving xattrs when using --backup.
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
16f167e
..
27e5b97
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-1944,9
+1944,16
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
cleanup:
if (back_file) {
cleanup:
if (back_file) {
+ int save_preserve_xattrs = preserve_xattrs;
if (f_copy >= 0)
close(f_copy);
if (f_copy >= 0)
close(f_copy);
+#ifdef SUPPORT_XATTRS
+ if (preserve_xattrs)
+ copy_xattrs(fname, backupptr);
+#endif
+ preserve_xattrs = 0;
set_file_attrs(backupptr, back_file, NULL, NULL, 0);
set_file_attrs(backupptr, back_file, NULL, NULL, 0);
+ preserve_xattrs = save_preserve_xattrs;
if (verbose > 1) {
rprintf(FINFO, "backed up %s to %s\n",
fname, backupptr);
if (verbose > 1) {
rprintf(FINFO, "backed up %s to %s\n",
fname, backupptr);