From a45faf2dd60f6474aa01b7cddd35d09ce329d6ce Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 7 Aug 2018 22:54:45 +0200 Subject: [PATCH] fixes the new nimcache handling --- compiler/options.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/options.nim b/compiler/options.nim index 4931b4330a..be9342085b 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -487,11 +487,12 @@ proc getOsCacheDir(): string = result = getHomeDir() / genSubDir proc getNimcacheDir*(conf: ConfigRef): string = + # XXX projectName should always be without a file extension! result = if conf.nimcacheDir.len > 0: conf.nimcacheDir elif conf.cmd == cmdCompileToJS: shortenDir(conf, conf.projectPath) / genSubDir - else: getOsCacheDir() / conf.projectName & + else: getOsCacheDir() / splitFile(conf.projectName).name & (if isDefined(conf, "release"): "_r" else: "_d") proc pathSubs*(conf: ConfigRef; p, config: string): string =