If a rename succeeds, but reports a failure, and the destination did not previously exist, the test for that condition had an uninitialized variable.

I can not find maintainer for this listed in maintainers.pl.

-John
[EMAIL PROTECTED]
Personal Opinion Only

--- /rsync_root/perl/lib/File/Copy.pm   Sun Feb 11 11:33:04 2007
+++ lib/File/Copy.pm    Mon Aug 27 22:24:01 2007
@@ -221,7 +221,8 @@
     # is on a remote NFS file system, and NFS lost the server's ack?
     return 1 if defined($fromsz) && !-e $from &&           # $from disappeared
                 (($tosz2,$tomt2) = (stat($to))[7,9]) &&    # $to's there
-                ($tosz1 != $tosz2 or $tomt1 != $tomt2) &&  #   and changed
+                  ((!defined $tosz1) ||                           #  not 
before or
+                  ($tosz1 != $tosz2 or $tomt1 != $tomt2)) &&  #   was changed
                 $tosz2 == $fromsz;                         # it's all there
 
     ($tosz1,$tomt1) = (stat($to))[7,9];  # just in case rename did something

Reply via email to