diff options
author | Kaushal Modi <kaushal.modi@gmail.com> | 2019-06-09 02:54:15 -0400 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-06-09 08:54:15 +0200 |
commit | 3c62d4146899cd27f8926563fb071ea7db981899 (patch) | |
tree | 9fe3ee1d5a771ee17550914689521646d199f03a /lib | |
parent | bce908f6ee9f24346641310d8f7f8971e92ffe01 (diff) | |
download | Nim-3c62d4146899cd27f8926563fb071ea7db981899.tar.gz |
Make -d:tempDir switch work once again [bugfix] (#11442)
Fixes https://github.com/nim-lang/Nim/issues/11441.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/os.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 8a185e81c..aa58fea73 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -798,12 +798,13 @@ proc getTempDir*(): string {.rtl, extern: "nos$1", ## * `expandTilde proc <#expandTilde,string>`_ ## * `getCurrentDir proc <#getCurrentDir>`_ ## * `setCurrentDir proc <#setCurrentDir,string>`_ + const tempDirDefault = "/tmp/" when defined(tempDir): - const tempDir {.strdefine.}: string = nil + const tempDir {.strdefine.}: string = tempDirDefault return tempDir elif defined(windows): return string(getEnv("TEMP")) & "\\" elif defined(android): return getHomeDir() - else: return "/tmp/" + else: return tempDirDefault proc expandTilde*(path: string): string {. tags: [ReadEnvEffect, ReadIOEffect].} = |