diff options
-rw-r--r-- | compiler/nim.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim index 35afecf20..c458f76f9 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -54,7 +54,8 @@ proc handleCmdLine(cache: IdentCache) = except OSError: gProjectFull = gProjectName let p = splitFile(gProjectFull) - gProjectPath = canonicalizePath p.dir + let dir = if p.dir.len > 0: p.dir else: getCurrentDir() + gProjectPath = canonicalizePath dir gProjectName = p.name else: gProjectPath = canonicalizePath getCurrentDir() |