Skip to content

Commit

Permalink
chore(conf): do not skip access check for OLD CONFIG.
Browse files Browse the repository at this point in the history
Refs #285.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Nov 6, 2023
1 parent 332f3a2 commit 0d6d075
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/conf/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0d6d075

Please sign in to comment.