mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
Make -d:tempDir switch work once again [bugfix] (#11442)
Fixes https://github.com/nim-lang/Nim/issues/11441.
This commit is contained in:
committed by
Andreas Rumpf
parent
bce908f6ee
commit
3c62d41468
@@ -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].} =
|
||||
|
||||
Reference in New Issue
Block a user