mirror of
https://github.com/irmen/prog8.git
synced 2025-01-26 19:30:59 +00:00
fix error when sourcepaths is empty
This commit is contained in:
parent
0fcd61e00f
commit
3281d9a215
@ -134,7 +134,7 @@ class ModuleImporter(private val program: Program,
|
||||
if (importingModule == null) { // <=> imported from library module
|
||||
sourcePaths
|
||||
} else {
|
||||
val dropCurDir = if(sourcePaths[0].name == ".") 1 else 0
|
||||
val dropCurDir = if(sourcePaths.isNotEmpty() && sourcePaths[0].name == ".") 1 else 0
|
||||
sourcePaths.drop(dropCurDir) +
|
||||
// FIXME: won't work until Prog8Parser is fixed s.t. it fully initialzes the modules it returns
|
||||
listOf(Path(importingModule.position.file).parent ?: Path("")) +
|
||||
|
Loading…
x
Reference in New Issue
Block a user