This resolves an ambiguity if the same file name is used both under
sysconfdir and the current working directory. You can use dot slash
./ to explicitly refer to files in the current working directory.
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1040
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
if (f != NULL)
break;
}
- }
- if (f == NULL) {
+ } else {
f = fopen(filename, "r");
- if (f == NULL) {
- erec = error(loc, "Could not open file \"%s\": %s\n",
- filename, strerror(errno));
- goto err;
- }
name = filename;
}
+ if (f == NULL) {
+ erec = error(loc, "Could not open file \"%s\": %s\n",
+ filename, strerror(errno));
+ goto err;
+ }
erec = scanner_push_file(scanner, name, f, loc);
if (erec != NULL)