From 0d6d075e027cf6a802fa7c837264823f69bdd34e Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Mon, 6 Nov 2023 09:01:07 +0100 Subject: [PATCH] chore(conf): do not skip access check for OLD CONFIG. Refs #285. Signed-off-by: Federico Di Pierro --- src/conf/config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/config.c b/src/conf/config.c index 171fe0a..af017e9 100644 --- a/src/conf/config.c +++ b/src/conf/config.c @@ -403,8 +403,10 @@ int read_config(enum CONFIG file, char *config_file) { int r = 0; config_t cfg; - if (access(config_file, F_OK) == -1 && file != OLD_GLOBAL) { - WARN("Config file %s not found.\n", config_file); + if (access(config_file, F_OK) == -1) { + if (file != OLD_GLOBAL) { + WARN("Config file %s not found.\n", config_file); + } return -1; }