Fix issue where squid-analyzer use default configuration file even if a custom one is specified with the -c option. Thanks to Thibaud Aubert for the report.
This commit is contained in:
parent
1e609e8b5c
commit
5bc0268ce7
|
@ -47,13 +47,17 @@ if ($build_date) {
|
|||
}
|
||||
}
|
||||
|
||||
# Allow backward compatibility with release < 4.0
|
||||
$configfile = $ARGV[0] if (($#ARGV == 0) && $ARGV[0]);
|
||||
if (($#ARGV < 0) && -e $DEFAULT_CONFFILE) {
|
||||
$configfile = $DEFAULT_CONFFILE;
|
||||
# Look at configuration file
|
||||
if (!$configfile) {
|
||||
# Backward compatibility with release < 4.0 with configuration
|
||||
# file as single argument.
|
||||
$configfile = $ARGV[0] if (($#ARGV == 0) && $ARGV[0]);
|
||||
|
||||
# Set default configuration file
|
||||
$configfile ||= $DEFAULT_CONFFILE;
|
||||
}
|
||||
|
||||
if (!$configfile || $help) {
|
||||
if ($help) {
|
||||
&usage;
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue