chiark
/
gitweb
/
~mdw
/
tgal
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9eac06
)
mason/.perl-lib/TrivGal.pm (listdir): Anchor regex to line start.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 11 Jun 2023 15:29:37 +0000
(16:29 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 11 Jun 2023 15:29:37 +0000
(16:29 +0100)
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
patch
|
blob
|
blame
|
history
diff --git
a/mason/.perl-lib/TrivGal.pm
b/mason/.perl-lib/TrivGal.pm
index bbef2ed5ebd93f4b6402910aa9c80b7e6d557835..85bf0cca51b8dff1706956913779c054ec4ee329 100644
(file)
--- 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#/$#) {