ids-functions.pl: Only read providers used rulefiles file if it exists.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2021-04-02 13:47:36 +02:00
parent 35bc92a307
commit 01fc880cf3

View File

@@ -1694,8 +1694,8 @@ sub read_used_provider_rulesfiles($) {
# Get the used rulesefile file for the provider.
my $rulesfile_file = &get_used_provider_rulesfile_file($provider);
# Check if the used rulesfile is empty.
unless (-z $rulesfile_file) {
# Check if the a used rulesfile exists for this provider.
if (-f $rulesfile_file) {
# Open the file or used rulefiles and read-in content.
open(FILE, $rulesfile_file) or die "Could not open $rulesfile_file. $!\n";