From 58bc1431796b61e7fdf3564538d28c811b868fd9 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 11 Jun 2023 16:29:37 +0100 Subject: [PATCH] mason/.perl-lib/TrivGal.pm (listdir): Anchor regex to line start. I don't think this is actually a problem, because the pattern irrefutably matches at the start of the line anyway. But for form's sake, it should be properly anchored. --- mason/.perl-lib/TrivGal.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mason/.perl-lib/TrivGal.pm b/mason/.perl-lib/TrivGal.pm index bbef2ed..85bf0cc 100644 --- a/mason/.perl-lib/TrivGal.pm +++ b/mason/.perl-lib/TrivGal.pm @@ -294,7 +294,7 @@ sub listdir ($) { $comment = defined $comment ? $comment . "\n" . $_ : $_; } else { if ($item && $comment) { $item->comment($comment); } - my ($indexp, $name, $c) = /(!\s+)?(\S+)\s*(\S|\S.*\S)?\s*$/; + my ($indexp, $name, $c) = /^(!\s+)?(\S+)\s*(\S|\S.*\S)?\s*$/; $name = urldecode $name; my $list; if ($name =~ m#/$#) { -- 2.11.0