summary refs log tree commit diff stats
path: root/compiler/nimconf.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-08-31 11:22:49 +0200
committerAraq <rumpf_a@web.de>2013-08-31 11:22:49 +0200
commit1161482ec2c2d83e1cd4f24d51e19b5bde6bcc3c (patch)
tree7603353bc50df2b794a69696f80d72484759562f /compiler/nimconf.nim
parente698d6255baac6bca1ba283a29141b83363d163d (diff)
downloadNim-1161482ec2c2d83e1cd4f24d51e19b5bde6bcc3c.tar.gz
fixes #459
Diffstat (limited to 'compiler/nimconf.nim')
-rw-r--r--compiler/nimconf.nim7
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):