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');