aboutsummaryrefslogtreecommitdiffstats
path: root/rsync.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-07-22 15:30:04 +0000
committerWayne Davison <wayned@samba.org>2004-07-22 15:30:04 +0000
commit077e59b7696ae242548881b0a8ba53e02d2d62d5 (patch)
tree7b78c6d023c360c6655b6e4bedc2b9cef5b250f8 /rsync.c
parent007e3c0e9a3e153e5c8c170ee508d5e2c86562a4 (diff)
downloadandroid_external_rsync-077e59b7696ae242548881b0a8ba53e02d2d62d5.tar.gz
android_external_rsync-077e59b7696ae242548881b0a8ba53e02d2d62d5.tar.bz2
android_external_rsync-077e59b7696ae242548881b0a8ba53e02d2d62d5.zip
The inplace handling in finish_transfer() now passes PERMS_SKIP_MTIME
to set_perms() if ok_to_set_time wasn't specified.
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/rsync.c b/rsync.c
index 7a1c3f93..472e1ef2 100644
--- a/rsync.c
+++ b/rsync.c
@@ -243,8 +243,7 @@ void finish_transfer(char *fname, char *fnametmp, struct file_struct *file,
if (inplace) {
if (verbose > 2)
rprintf(FINFO, "finishing %s\n", fname);
- set_perms(fname, file, NULL, 0);
- return;
+ goto do_set_perms;
}
/* move tmp file over real file */
@@ -256,10 +255,10 @@ void finish_transfer(char *fname, char *fnametmp, struct file_struct *file,
ret == -2 ? "copy" : "rename",
full_fname(fnametmp), fname);
do_unlink(fnametmp);
- } else {
- set_perms(fname, file, NULL,
- ok_to_set_time ? 0 : PERMS_SKIP_MTIME);
+ return;
}
+ do_set_perms:
+ set_perms(fname, file, NULL, ok_to_set_time ? 0 : PERMS_SKIP_MTIME);
}
const char *who_am_i(void)