From 2f585f8b41e5414917fd5b76c557e80474f6e4f2 Mon Sep 17 00:00:00 2001 From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 06:03:45 +0000 Subject: [PATCH] Avoid "conditional and" for preparing file list in static rendering --- blosxom.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blosxom.cgi b/blosxom.cgi index b80cfbc..f2861db 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -324,8 +324,8 @@ if (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and par foreach ( ('', split /\//, $path) ) { $p .= "/$_"; $p =~ s!^/!!; - $done{$p}++ and next; - (-d "$static_dir/$p" or $p =~ /\.$file_extension$/) or mkdir "$static_dir/$p", 0755; + next if $done{$p}++; + mkdir "$static_dir/$p", 0755 unless (-d "$static_dir/$p" or $p =~ /\.$file_extension$/); foreach $flavour ( @static_flavours ) { my $content_type = (&$template($p,'content_type',$flavour)); $content_type =~ s!\n.*!!s; -- 2.39.2