Skip to content

Commit 364c417

Browse files
committed
For [GH #161][GH #117] - Add a guard for action lookups
1 parent 9d298d3 commit 364c417

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lite/VFS.pm

+9
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,15 @@ require File::Basename;
415415
print STDERR "# VFS: Dir::load(", sorted_dump($nameSpec), ") in $in\n"
416416
if DEBUG_LOOKUP;
417417
my ($partName, $realFile) = lexpand($nameSpec);
418+
419+
# When $partName contains NUL like 'do\0action',
420+
# we should avoid filesystem testings.
421+
if ($partName =~ /\0/) {
422+
print STDERR "# VFS: -> avoid fs lookup for \\0 in $in\n"
423+
if DEBUG_LOOKUP;
424+
return;
425+
}
426+
418427
$realFile ||= $partName;
419428

420429
my $vfsname = "$in->{cf_path}/$realFile";

0 commit comments

Comments
 (0)