perlcritic: return undef in list context too

This commit is contained in:
Graham Christensen 2021-12-14 10:24:53 -05:00
parent d0a1cf5785
commit e43f487157

View file

@ -396,7 +396,7 @@ sub pathIsInsidePrefix {
# .. should not take us outside of the prefix. # .. should not take us outside of the prefix.
if ($c eq "..") { if ($c eq "..") {
return if length($cur) <= length($prefix); return undef if length($cur) <= length($prefix);
$cur =~ s/\/[^\/]*$// or die; # remove last component $cur =~ s/\/[^\/]*$// or die; # remove last component
next; next;
} }