Skip to content

Commit

Permalink
File::Copy: compare inode numbers as strings
Browse files Browse the repository at this point in the history
as recommended in perldoc -f stat
  • Loading branch information
tonycoz committed May 25, 2021
1 parent ff6af44 commit 76d2194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/File/Copy.pm
Expand Up @@ -24,7 +24,7 @@ sub syscopy;
sub cp;
sub mv;

$VERSION = '2.35';
$VERSION = '2.36';

require Exporter;
@ISA = qw(Exporter);
Expand Down Expand Up @@ -104,7 +104,7 @@ sub copy {
my @fs = stat($from);
if (@fs) {
my @ts = stat($to);
if (@ts && $fs[0] == $ts[0] && $fs[1] == $ts[1] && !-p $from) {
if (@ts && $fs[0] == $ts[0] && $fs[1] eq $ts[1] && !-p $from) {
carp("'$from' and '$to' are identical (not copied)");
return 0;
}
Expand Down

0 comments on commit 76d2194

Please sign in to comment.