From efcd83e5e971ead46da10c22edcc688254ca82b7 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 5 Jul 2026 12:44:00 +0200 Subject: [PATCH] Add defaupt path to --conffile, if not set. Signed-off-by: Thomas Hochstein --- doc/ChangeLog | 1 + lib/NewsStats.pm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 754c69f..bf98ec9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -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. diff --git a/lib/NewsStats.pm b/lib/NewsStats.pm index a68e36d..3653a71 100644 --- a/lib/NewsStats.pm +++ b/lib/NewsStats.pm @@ -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');