chiark / gitweb /
cope without main config file
[disorder] / lib / configuration.c
index 60b3e0e278a87332c6cb7b0d065e0268eddc2f05..081e6d2bb3d5504a72e3600714ba529582672659 100644 (file)
@@ -1063,8 +1063,10 @@ int config_read() {
 
   set_configfile();
   c = config_default();
-  if(config_include(c, configfile))
-    return -1;
+  /* standalone Disobedience installs might not have a global config file */
+  if(access(configfile, F_OK) == 0)
+    if(config_include(c, configfile))
+      return -1;
   /* if we can read the private config file, do */
   if((privconf = config_private())
      && access(privconf, R_OK) == 0