only replace the tilde when followed by a slash; refs #6176

This commit is contained in:
Araq 2017-09-03 01:08:23 +02:00
commit 2d8e97ee03

View file

@ -290,8 +290,8 @@ proc pathSubs*(p, config: string): string =
"projectpath", options.gProjectPath, "projectpath", options.gProjectPath,
"projectdir", options.gProjectPath, "projectdir", options.gProjectPath,
"nimcache", getNimcacheDir()]) "nimcache", getNimcacheDir()])
if '~' in result: if "~/" in result:
result = result.replace("~", home) result = result.replace("~/", home & '/')
proc toGeneratedFile*(path, ext: string): string = proc toGeneratedFile*(path, ext: string): string =
## converts "/home/a/mymodule.nim", "rod" to "/home/a/nimcache/mymodule.rod" ## converts "/home/a/mymodule.nim", "rod" to "/home/a/nimcache/mymodule.rod"