]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids-functions.pl: Only read providers used rulefiles file if it exists.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 2 Apr 2021 11:47:36 +0000 (13:47 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 19 Dec 2021 12:23:43 +0000 (13:23 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index f95a02ddd48e46f3acebb9fd2425ddaed0db8a0b..7a366154049fd503584df19597bae3d1fdf9e1ec 100644 (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";