diff options
author | Kaushal Modi <kaushal.modi@gmail.com> | 2018-08-17 04:52:10 -0400 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-17 10:52:10 +0200 |
commit | d73b19e379bcc96557e0178ff3d4a2a5184c3d43 (patch) | |
tree | e9e57ae993ebca1635020c5addadc317fd7ec871 /lib/pure | |
parent | ce4383be3b10ba1ff418e5fa000a956be7816e80 (diff) | |
download | Nim-d73b19e379bcc96557e0178ff3d4a2a5184c3d43.tar.gz |
Look for user nim.cfg in "nim/" subdir in usual config dir locations (#8662)
Fixes https://github.com/nim-lang/Nim/issues/8661.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/ospaths.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/ospaths.nim b/lib/pure/ospaths.nim index cfa5e53c1..0414eae5d 100644 --- a/lib/pure/ospaths.nim +++ b/lib/pure/ospaths.nim @@ -525,14 +525,14 @@ proc getConfigDir*(): string {.rtl, extern: "nos$1", ## Returns the config directory of the current user for applications. ## ## On non-Windows OSs, this proc conforms to the XDG Base Directory - ## spec. Thus, this proc returns the value of the XDG_CONFIG_DIR environment + ## spec. Thus, this proc returns the value of the XDG_CONFIG_HOME environment ## variable if it is set, and returns the default configuration directory, ## "~/.config/", otherwise. ## ## An OS-dependent trailing slash is always present at the end of the ## returned string; `\\` on Windows and `/` on all other OSs. when defined(windows): return string(getEnv("APPDATA")) & "\\" - elif getEnv("XDG_CONFIG_DIR"): return string(getEnv("XDG_CONFIG_DIR")) & "/" + elif getEnv("XDG_CONFIG_HOME"): return string(getEnv("XDG_CONFIG_HOME")) & "/" else: return string(getEnv("HOME")) & "/.config/" proc getTempDir*(): string {.rtl, extern: "nos$1", |