diff options
Diffstat (limited to 'compiler/options.nim')
-rw-r--r-- | compiler/options.nim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index 04ed2412e..50f12d843 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -227,7 +227,16 @@ proc setDefaultLibpath*() = libpath = parentNimLibPath proc canonicalizePath*(path: string): string = - result = path.expandFilename + # on Windows, 'expandFilename' calls getFullPathName which doesn't do + # case corrections, so we have to use this convoluted way of retrieving + # the true filename (see tests/modules and Nimble uses 'import Uri' instead + # of 'import uri'): + when defined(windows): + result = path.expandFilename + for x in walkFiles(result): + return x + else: + result = path.expandFilename proc shortenDir*(dir: string): string = ## returns the interesting part of a dir |