Fix the error message on one of the rename operations.
[rsync/rsync.git] / support / atomic-rsync
index 2f43e1e..33a493c 100755 (executable)
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 #
 # This script lets you update a hierarchy of files in an atomic way by
-# first creating a new hierarchy using --link-dest to rsync, and then
-# swapping the hierarchy into place.  See the usage message for more
-# details and some important caveats!
+# first creating a new hierarchy using rsync's --link-dest option, and
+# then swapping the hierarchy into place.  **See the usage message for
+# more details and some important caveats!**
 
 use strict;
 use Cwd 'abs_path';
@@ -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;