aboutsummaryrefslogtreecommitdiffstats
path: root/backup.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-05-17 09:30:46 -0700
committerWayne Davison <wayned@samba.org>2008-05-17 09:35:46 -0700
commite9489cd6cb380b30727bd3d074eacc59abca080e (patch)
treebc7f1cebf7a527b15326ad5af580e5407b403c3c /backup.c
parentf1ca7c4429f2a8e9de72f91d95218bb324df6a9e (diff)
downloadandroid_external_rsync-e9489cd6cb380b30727bd3d074eacc59abca080e.tar.gz
android_external_rsync-e9489cd6cb380b30727bd3d074eacc59abca080e.tar.bz2
android_external_rsync-e9489cd6cb380b30727bd3d074eacc59abca080e.zip
Fixed several issues with preserving xattrs when using --backup.
Diffstat (limited to 'backup.c')
-rw-r--r--backup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backup.c b/backup.c
index 22cfc712..c3f66ebe 100644
--- 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;
+ int save_preserve_xattrs = preserve_xattrs;
int kept = 0;
int ret_code;
@@ -338,7 +339,9 @@ static int keep_backup(const char *fname)
robust_unlink(fname); /* Just in case... */
}
}
+ preserve_xattrs = 0;
set_file_attrs(buf, file, NULL, fname, 0);
+ preserve_xattrs = save_preserve_xattrs;
unmake_file(file);
if (verbose > 1) {