X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=48ee5c1f7668cf7bd136522e887a29d9934f0a2f;hp=a979a0d29da750919f37b77998171717430dca21;hb=011c1f0a1750d2ff913302a3e5768de9287f0b0c;hpb=f44af6eebbd9d8aafe14db09b54f8a33b23f9e07 diff --git a/blosxom.cgi b/blosxom.cgi index a979a0d..48ee5c1 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -363,7 +363,7 @@ sub generate { ($path,$fn) = $path_file =~ m!^$datadir/(?:(.*)/)?(.*)\.$file_extension!; # Only stories in the right hierarchy - $path =~ /^$currentdir/ or $path_file eq "$datadir/$currentdir" or next; + $path =~ /^$currentdir(?=$|/)/ or $path_file eq "$datadir/$currentdir" or next; # Prepend a slash for use in templates only if a path exists $path &&= "/$path";