Change 11555 by jhi@alpha on 2001/08/02 22:29:34

        Be more careful about non-existent files.

Affected files ...

... //depot/perl/lib/File/Copy.pm#22 edit

Differences ...

==== //depot/perl/lib/File/Copy.pm#22 (text) ====
Index: perl/lib/File/Copy.pm
--- perl/lib/File/Copy.pm.~1~   Thu Aug  2 16:45:05 2001
+++ perl/lib/File/Copy.pm       Thu Aug  2 16:45:05 2001
@@ -72,10 +72,10 @@
 
     if ($Config{d_symlink} && $Config{d_readlink} &&
        !($^O eq 'Win32' || $^O eq 'os2' || $^O eq 'vms')) {
-       if (-l $from || -l $to) {
+       if ((-e $from && -l $from) || (-e $to && -l $to)) {
            my @fs = stat($from);
            my @ts = stat($to);
-           if ($fs[0] == $ts[0] && $fs[1] == $ts[1]) {
+           if (@fs && @ts && $fs[0] == $ts[0] && $fs[1] == $ts[1]) {
                croak("'$from' and '$to' are identical (not copied)");
            }
        }
End of Patch.

Reply via email to