From 92b48dbcad8fc564a2146a5c4fa73aba3dbc99d1 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 6 Jan 2017 18:22:27 +0100 Subject: [PATCH] fixes 'nim c file_without_nim_ext' regression; refs #5183 --- compiler/nim.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/nim.nim b/compiler/nim.nim index 35afecf205..c458f76f9a 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()