diff options
author | Araq <rumpf_a@web.de> | 2013-08-31 11:22:49 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-08-31 11:22:49 +0200 |
commit | 1161482ec2c2d83e1cd4f24d51e19b5bde6bcc3c (patch) | |
tree | 7603353bc50df2b794a69696f80d72484759562f /compiler/nimconf.nim | |
parent | e698d6255baac6bca1ba283a29141b83363d163d (diff) | |
download | Nim-1161482ec2c2d83e1cd4f24d51e19b5bde6bcc3c.tar.gz |
fixes #459
Diffstat (limited to 'compiler/nimconf.nim')
-rw-r--r-- | compiler/nimconf.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index 39375ffd3..507812d9c 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -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): |