fixes 'nim c file_without_nim_ext' regression; refs #5183

This commit is contained in:
Andreas Rumpf 2017-01-06 18:22:27 +01:00
commit 92b48dbcad

View file

@ -54,7 +54,8 @@ proc handleCmdLine(cache: IdentCache) =
except OSError: except OSError:
gProjectFull = gProjectName gProjectFull = gProjectName
let p = splitFile(gProjectFull) 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 gProjectName = p.name
else: else:
gProjectPath = canonicalizePath getCurrentDir() gProjectPath = canonicalizePath getCurrentDir()