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
Use safe_fname() in full_fname().
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
7a1c3f9
..
472e1ef
100644
(file)
--- 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);
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 */
}
/* 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);
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)
}
const char *who_am_i(void)