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]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
22cfc71
..
c3f66eb
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-204,6
+204,7
@@
static int keep_backup(const char *fname)
stat_x sx;
struct file_struct *file;
char *buf;
stat_x sx;
struct file_struct *file;
char *buf;
+ int save_preserve_xattrs = preserve_xattrs;
int kept = 0;
int ret_code;
int kept = 0;
int ret_code;
@@
-338,7
+339,9
@@
static int keep_backup(const char *fname)
robust_unlink(fname); /* Just in case... */
}
}
robust_unlink(fname); /* Just in case... */
}
}
+ preserve_xattrs = 0;
set_file_attrs(buf, file, NULL, fname, 0);
set_file_attrs(buf, file, NULL, fname, 0);
+ preserve_xattrs = save_preserve_xattrs;
unmake_file(file);
if (verbose > 1) {
unmake_file(file);
if (verbose > 1) {