diff options
author | Araq <rumpf_a@web.de> | 2017-09-03 01:08:23 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-09-03 01:08:23 +0200 |
commit | 2d8e97ee03cab9ad7442bed01e14360269c516bb (patch) | |
tree | 5532d4eb2cfadea7045f69506aae322038def925 | |
parent | bad52ca29aa958d51ab1c121f7c4c5fef8b49043 (diff) | |
download | Nim-2d8e97ee03cab9ad7442bed01e14360269c516bb.tar.gz |
only replace the tilde when followed by a slash; refs #6176
-rw-r--r-- | compiler/options.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index e9193f81e..9a5a1ae2a 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -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" |