mirror of
https://github.com/irmen/prog8.git
synced 2024-08-10 14:29:06 +00:00
fixed crash when importing modules from the same directory as the main program
This commit is contained in:
parent
5134ea76bf
commit
8df778a515
@ -102,7 +102,7 @@ internal class ModuleImporter {
|
|||||||
|
|
||||||
private fun discoverImportedModuleFile(name: String, source: Path, position: Position?): Path {
|
private fun discoverImportedModuleFile(name: String, source: Path, position: Position?): Path {
|
||||||
val fileName = "$name.p8"
|
val fileName = "$name.p8"
|
||||||
val locations = if(source.toString().isEmpty()) mutableListOf<Path>() else mutableListOf(source.parent)
|
val locations = if(source.toString().isEmpty()) mutableListOf<Path>() else mutableListOf(source.parent ?: Path.of("."))
|
||||||
|
|
||||||
val propPath = System.getProperty("prog8.libdir")
|
val propPath = System.getProperty("prog8.libdir")
|
||||||
if(propPath!=null)
|
if(propPath!=null)
|
||||||
|
Loading…
Reference in New Issue
Block a user