aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-09-26 19:29:39 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-09-26 19:29:45 +1300
commit8dce1c8083a22de40d0e66ffc2fc960c988bf0c3 (patch)
tree7e447fb6b3d645857902fc4905b7a43bae9208bf
parentBump version number (diff)
downloadcheckem-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.
-rwxr-xr-xcheckem6
1 files changed, 3 insertions, 3 deletions
diff --git a/checkem b/checkem
index ee0e954..9715acc 100755
--- a/checkem
+++ b/checkem
@@ -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;