From 2d8e97ee03cab9ad7442bed01e14360269c516bb Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 3 Sep 2017 01:08:23 +0200 Subject: [PATCH] only replace the tilde when followed by a slash; refs #6176 --- compiler/options.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/options.nim b/compiler/options.nim index e9193f81e0..9a5a1ae2a0 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"