Add defaupt path to --conffile, if not set.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2026-07-05 12:44:00 +02:00
parent f3b184f2e3
commit efcd83e5e9
2 changed files with 3 additions and 0 deletions

View file

@ -7,6 +7,7 @@ NewsStats 0.5.0 (unreleased)
dopostingstats.sh accordingly, fix all references.
* Fix missing variable initialisation in FormatOutput().
* gatherstats: Don't' overwrite User-Agent with X-Newsreader.
* Add defaupt path to --conffile, if not set.
NewsStats 0.4.0 (2025-06-02)
* Reformat $Conf{TLH} for GroupStats only.

View file

@ -101,6 +101,8 @@ sub ReadConfig {
my ($ConfFile) = @_;
# set default
$ConfFile = $HomePath . '/etc/newsstats.conf' if !$ConfFile;
# add default path if none is set
$ConfFile = $HomePath . '/etc/' . $ConfFile if ($ConfFile !~ /[\\\/]/);
# mandatory configuration options
my @Mandatory = ('DBDriver','DBHost','DBUser','DBPw','DBDatabase',
'DBTableRaw','DBTableGrps');