diff options
-rw-r--r-- | compiler/commands.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 8b03dfec4..27da03bbe 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -197,8 +197,11 @@ proc testCompileOption*(switch: string, info: TLineInfo): bool = else: InvalidCmdLineOption(passCmd1, switch, info) proc processPath(path: string, notRelativeToProj = false): string = - let p = if notRelativeToProj or os.isAbsolute(path) or '$' in path: path - else: options.gProjectPath / path + let p = if notRelativeToProj or os.isAbsolute(path) or + '$' in path or path[0] == '.': + path + else: + options.gProjectPath / path result = UnixToNativePath(p % ["nimrod", getPrefixDir(), "lib", libpath, "home", removeTrailingDirSep(os.getHomeDir()), "projectname", options.gProjectName, |