summaryrefslogtreecommitdiff
path: root/lib/File/Copy.pm
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2012-08-27 18:09:11 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2012-08-28 18:29:11 +0100
commita0084943302ae84253561a08e28aecf602611ac4 (patch)
tree28373583111beff737d595bbd71a6cc647a401f7 /lib/File/Copy.pm
parentbf71573d729d502ade207e35d1b714dac9d062f4 (diff)
downloadperl-a0084943302ae84253561a08e28aecf602611ac4.tar.gz
Fix File::Copy test failure on Windows
Failure was introduced by 43ddfa5614 which looks for a warning message from code that isn't run on Windows.
Diffstat (limited to 'lib/File/Copy.pm')
-rw-r--r--lib/File/Copy.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm
index b5ca436618..fd7403dff4 100644
--- a/lib/File/Copy.pm
+++ b/lib/File/Copy.pm
@@ -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