expandFilename on windows is now consistent with other platforms (#10154)
This commit is contained in:
parent
ba7d33b4e4
commit
e9a192c36f
2 changed files with 49 additions and 52 deletions
|
|
@ -482,16 +482,7 @@ proc setDefaultLibpath*(conf: ConfigRef) =
|
|||
conf.libpath = AbsoluteDir parentNimLibPath
|
||||
|
||||
proc canonicalizePath*(conf: ConfigRef; path: AbsoluteFile): AbsoluteFile =
|
||||
# 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 = AbsoluteFile path.string.expandFilename
|
||||
for x in walkFiles(result.string):
|
||||
return AbsoluteFile x
|
||||
else:
|
||||
result = AbsoluteFile path.string.expandFilename
|
||||
result = AbsoluteFile path.string.expandFilename
|
||||
|
||||
proc shortenDir*(conf: ConfigRef; dir: string): string {.
|
||||
deprecated: "use 'relativeTo' instead".} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue