mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
fixes #459
This commit is contained in:
@@ -213,8 +213,11 @@ proc getUserConfigPath(filename: string): string =
|
||||
proc getSystemConfigPath(filename: string): string =
|
||||
# try standard configuration file (installation did not distribute files
|
||||
# the UNIX way)
|
||||
result = joinPath([getPrefixDir(), "config", filename])
|
||||
if not ExistsFile(result): result = "/etc/" & filename
|
||||
let p = getPrefixDir()
|
||||
result = joinPath([p, "config", filename])
|
||||
when defined(unix):
|
||||
if not existsFile(result): result = joinPath([p, "etc", filename])
|
||||
if not existsFile(result): result = "/etc/" & filename
|
||||
|
||||
proc LoadConfigs*(cfg: string) =
|
||||
# set default value (can be overwritten):
|
||||
|
||||
Reference in New Issue
Block a user