mirror of
https://github.com/darold/squidanalyzer.git
synced 2025-07-31 01:44:29 +02:00
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
|
# Look at configuration file
|
||||||
$configfile = $ARGV[0] if (($#ARGV == 0) && $ARGV[0]);
|
if (!$configfile) {
|
||||||
if (($#ARGV < 0) && -e $DEFAULT_CONFFILE) {
|
# Backward compatibility with release < 4.0 with configuration
|
||||||
$configfile = $DEFAULT_CONFFILE;
|
# 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;
|
&usage;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user