This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix File::Copy test failure on Windows
authorSteve Hay <steve.m.hay@googlemail.com>
Mon, 27 Aug 2012 17:09:11 +0000 (18:09 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Tue, 28 Aug 2012 17:29:11 +0000 (18:29 +0100)
Failure was introduced by 43ddfa5614 which looks for a warning message from
code that isn't run on Windows.

lib/File/Copy.pm

index b5ca436..fd7403d 100644 (file)
@@ -148,6 +148,10 @@ sub copy {
            }
        }
     }
+    elsif (_eq($from, $to)) {
+       carp("'$from' and '$to' are identical (not copied)");
+       return 0;
+    }
 
     if (defined &syscopy && !$Syscopy_is_copy
        && !$to_a_handle