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
Don't call copy_file() for a dry-run. (Thanks, Matt!)
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
d82fa4a
..
47803c1
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-904,7
+904,7
@@
static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
#ifdef SUPPORT_HARD_LINKS
try_a_copy: /* Copy the file locally. */
#endif
#ifdef SUPPORT_HARD_LINKS
try_a_copy: /* Copy the file locally. */
#endif
- if (copy_file(cmpbuf, fname, file->mode, 0) < 0) {
+ if (
!dry_run &&
copy_file(cmpbuf, fname, file->mode, 0) < 0) {
if (verbose) {
rsyserr(FINFO, errno, "copy_file %s => %s",
full_fname(cmpbuf), fname);
if (verbose) {
rsyserr(FINFO, errno, "copy_file %s => %s",
full_fname(cmpbuf), fname);