The Samba-Bugzilla – Bug 5050
rsync tries to --copy-dest in --dry-run mode
Last modified: 2008-07-26 10:17:27 UTC
With --copy-dest, rsync tries to copy basis files with unchanged data into the destination even in --dry-run mode; fortunately, the attempt is blocked by do_open. Rsync should itemize the local copy without trying to actually perform it.
To reproduce this bug:
mkdir src dest basis
echo foo >src/file
echo foo >basis/file
rsync -r -ni --checksum --copy-dest=../basis/ src/ dest/
rsync: open "/path/to/dest/file": Success (0)
rsync error: some files could not be transferred (code 23) at main.c(1053) [sender=3.0.0pre4]
Created attachment 2955 [details]
Fix: skip the call to copy_file in dry-run mode
Your fix is now in CVS. Thanks!