diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-09-26 19:29:39 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-09-26 19:29:45 +1300 |
commit | 8dce1c8083a22de40d0e66ffc2fc960c988bf0c3 (patch) | |
tree | 7e447fb6b3d645857902fc4905b7a43bae9208bf /checkem | |
parent | Bump version number (diff) | |
download | checkem-8dce1c8083a22de40d0e66ffc2fc960c988bf0c3.tar.gz (sig) checkem-8dce1c8083a22de40d0e66ffc2fc960c988bf0c3.zip |
Use lstat() not stat()v2.16
For systems with symbolic links, this will stat the link itself, not the
thing it points to. We ignore symbolic links once we detect them anyway.
Diffstat (limited to 'checkem')
-rwxr-xr-x | checkem | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -26,7 +26,7 @@ use File::Find; use Digest; # Version number to make Perl::Critic happy -our $VERSION = 2.15; +our $VERSION = 2.16; # Complain if there are no arguments if ( !@ARGV ) { @@ -34,7 +34,7 @@ if ( !@ARGV ) { exit 2; } -# Convenience keys into stat() return array for clarity and to appease +# Convenience keys into lstat() return array for clarity and to appease # Perl::Critic my %STATS = ( dev => 0, @@ -73,7 +73,7 @@ find { my %f = ( name => $File::Find::name ); # Pull in the stat values we care about - if ( @f{ keys %STATS } = ( stat $f{name} )[ values %STATS ] ) { + if ( @f{ keys %STATS } = ( lstat $f{name} )[ values %STATS ] ) { # Check it's a regular file return if not $f{mode} & S_IFREG; |