summaryrefslogtreecommitdiff
path: root/rsync.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 /rsync.c
parentf1ca7c4429f2a8e9de72f91d95218bb324df6a9e (diff)
downloadrsync-e9489cd6cb380b30727bd3d074eacc59abca080e.tar.gz
rsync-e9489cd6cb380b30727bd3d074eacc59abca080e.tar.bz2
rsync-e9489cd6cb380b30727bd3d074eacc59abca080e.zip
Fixed several issues with preserving xattrs when using --backup.
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rsync.c b/rsync.c
index 48894c97..9921da04 100644
--- a/rsync.c
+++ b/rsync.c
@@ -561,8 +561,11 @@ int finish_transfer(const char *fname, const char *fnametmp,
goto do_set_file_attrs;
}
- if (make_backups > 0 && overwriting_basis && !make_backup(fname))
- return 1;
+ if (make_backups > 0 && overwriting_basis) {
+ if (!make_backup(fname))
+ return 1;
+ fnamecmp = get_backup_name(fname);
+ }
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,