When renaming $dest_dir to $old_dir, don't say we're renaming $new_dir to $old_dir on errors. --- a/atomic-rsync +++ b/atomic-rsync @@ -48,7 +48,7 @@ if (system($RSYNC_PROG, "--link-dest=$dest_dir", @ARGV)) { exit $?; } -rename($dest_dir, $old_dir) or die "Unable to rename $new_dir to $old_dir: $!"; +rename($dest_dir, $old_dir) or die "Unable to rename $dest_dir to $old_dir: $!" rename($new_dir, $dest_dir) or die "Unable to rename $new_dir to $dest_dir: $!" exit;
I fixed this in the git repository.
I do not see the fix in the git repository at http://gitweb.samba.org/?p=rsync.git;a=summary .
.