Don't attempt to read file if open fails
This commit is contained in:
parent
2eacc71acc
commit
5cad38a047
1 changed files with 2 additions and 0 deletions
|
@ -1664,6 +1664,7 @@ sub _read_config {
|
||||||
local *FD;
|
local *FD;
|
||||||
if (!open(FD, "< $file")) {
|
if (!open(FD, "< $file")) {
|
||||||
warning("Cannot open file '%s'. (%s)", $file, $!);
|
warning("Cannot open file '%s'. (%s)", $file, $!);
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
# If file is owned by our effective uid, ensure that it has no access for group or others.
|
# If file is owned by our effective uid, ensure that it has no access for group or others.
|
||||||
|
@ -1809,6 +1810,7 @@ sub _read_config {
|
||||||
warning("file ends while expecting a continuation line.")
|
warning("file ends while expecting a continuation line.")
|
||||||
if $continuation;
|
if $continuation;
|
||||||
|
|
||||||
|
done:
|
||||||
%$globals = %globals;
|
%$globals = %globals;
|
||||||
%$config = %config;
|
%$config = %config;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue