diff options
author | Wayne Davison <wayned@samba.org> | 2004-07-22 15:30:04 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-07-22 15:30:04 +0000 |
commit | 077e59b7696ae242548881b0a8ba53e02d2d62d5 (patch) | |
tree | 7b78c6d023c360c6655b6e4bedc2b9cef5b250f8 /rsync.c | |
parent | 007e3c0e9a3e153e5c8c170ee508d5e2c86562a4 (diff) | |
download | android_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.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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) |