mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 19:22:40 +00:00
only replace the tilde when followed by a slash; refs #6176
This commit is contained in:
@@ -290,8 +290,8 @@ proc pathSubs*(p, config: string): string =
|
||||
"projectpath", options.gProjectPath,
|
||||
"projectdir", options.gProjectPath,
|
||||
"nimcache", getNimcacheDir()])
|
||||
if '~' in result:
|
||||
result = result.replace("~", home)
|
||||
if "~/" in result:
|
||||
result = result.replace("~/", home & '/')
|
||||
|
||||
proc toGeneratedFile*(path, ext: string): string =
|
||||
## converts "/home/a/mymodule.nim", "rod" to "/home/a/nimcache/mymodule.rod"
|
||||
|
||||
Reference in New Issue
Block a user