Skip to content

Commit 2656070

Browse files
author
Carl Masak
committed
[ModuleLoader] strip away Unixy './' in module path
This prevented the lookup from working on Linux. Works now.
1 parent 120ff08 commit 2656070

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ModuleLoader.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ knowhow ModuleLoader {
123123
# May be fake executable, so may not end in .pbc. If so, add it.
124124
# Strip any .exe.
125125
my $module_name := ((pir::getinterp__P())[2])[0];
126+
if pir::substr($module_name, 0, 2) eq './' {
127+
$module_name := pir::substr($module_name, 2, pir::length($module_name) - 2);
128+
}
126129
if pir::substr($module_name, pir::length($module_name) - 4, 4) eq '.pbc' {
127130
# Fine as it is.
128131
}

0 commit comments

Comments
 (0)