fixes #459
This commit is contained in:
parent
e698d6255b
commit
1161482ec2
1 changed files with 5 additions and 2 deletions
|
|
@ -213,8 +213,11 @@ proc getUserConfigPath(filename: string): string =
|
||||||
proc getSystemConfigPath(filename: string): string =
|
proc getSystemConfigPath(filename: string): string =
|
||||||
# try standard configuration file (installation did not distribute files
|
# try standard configuration file (installation did not distribute files
|
||||||
# the UNIX way)
|
# the UNIX way)
|
||||||
result = joinPath([getPrefixDir(), "config", filename])
|
let p = getPrefixDir()
|
||||||
if not ExistsFile(result): result = "/etc/" & filename
|
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) =
|
proc LoadConfigs*(cfg: string) =
|
||||||
# set default value (can be overwritten):
|
# set default value (can be overwritten):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue