Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
FILE* f = NULL;
int r;
+#warning HARD-CODED CONFIGURATION FILE PATH
+
// Load some default configuration if not path was provided
if (!path)
path = "/etc/pakfire/pakfire.conf";
// Open the configuration file
f = fopen(path, "r");
- if (!f)
- return -errno;
+ if (!f) {
+ switch (errno) {
+ // Ignore if the file does not exist
+ case ENOENT:
+ return 0;
+
+ default:
+ return -errno;
+ }
+ }
// Read the configuration file
r = pakfire_config_read(ctx->config, f);