diff options
Diffstat (limited to 'compiler/options.nim')
-rw-r--r-- | compiler/options.nim | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index f312c877c..af1e21e60 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -330,13 +330,16 @@ proc rawFindFile2(f: string): string = result = "" proc findFile*(f: string): string {.procvar.} = - result = f.rawFindFile - if result.len == 0: - result = f.toLower.rawFindFile + if f.isAbsolute: + result = if f.existsFile: f else: "" + else: + result = f.rawFindFile if result.len == 0: - result = f.rawFindFile2 + result = f.toLower.rawFindFile if result.len == 0: - result = f.toLower.rawFindFile2 + result = f.rawFindFile2 + if result.len == 0: + result = f.toLower.rawFindFile2 proc findModule*(modulename, currentModule: string): string = # returns path to module |