mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 19:54:26 +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
|
if (importingModule == null) { // <=> imported from library module
|
||||||
sourcePaths
|
sourcePaths
|
||||||
} else {
|
} else {
|
||||||
val dropCurDir = if(sourcePaths[0].name == ".") 1 else 0
|
val dropCurDir = if(sourcePaths.isNotEmpty() && sourcePaths[0].name == ".") 1 else 0
|
||||||
sourcePaths.drop(dropCurDir) +
|
sourcePaths.drop(dropCurDir) +
|
||||||
// FIXME: won't work until Prog8Parser is fixed s.t. it fully initialzes the modules it returns
|
// FIXME: won't work until Prog8Parser is fixed s.t. it fully initialzes the modules it returns
|
||||||
listOf(Path(importingModule.position.file).parent ?: Path("")) +
|
listOf(Path(importingModule.position.file).parent ?: Path("")) +
|
||||||
|
Loading…
Reference in New Issue
Block a user