This commit is contained in:
Araq
2013-08-31 11:22:49 +02:00
parent e698d6255b
commit 1161482ec2

View File

@@ -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):