From: Gavin Carr Date: Fri, 18 Jun 2010 20:22:06 +0000 (+0100) Subject: Factor out readability check in default entries(). X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=commitdiff_plain;h=057ee9ef40098c4c4c67b3ab24e5a7cafa34e99a;hp=26ad3f96fbc541fcd32ac772462f793bc619e275 Factor out readability check in default entries(). --- diff --git a/blosxom.cgi b/blosxom.cgi index 11143b1..420a1b6 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -555,6 +555,7 @@ $entries = sub { sub { my $curr_depth = $File::Find::dir =~ tr[/][]; return if $depth and $curr_depth > $depth; + return if !-r $File::Find::name; if ( @@ -563,7 +564,7 @@ $entries = sub { =~ m!^$datadir/(?:(.*)/)?(.+)\.$file_extension$! # not an index, .file, and is readable - and $2 ne 'index' and $2 !~ /^\./ and ( -r $File::Find::name ) + and $2 ne 'index' and $2 !~ /^\./ ) { @@ -592,7 +593,7 @@ $entries = sub { } # not an entries match - elsif ( !-d $File::Find::name and -r $File::Find::name ) { + elsif ( !-d $File::Find::name ) { $others{$File::Find::name} = stat($File::Find::name)->mtime; } },