]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids-functions.pl: Check if given filename exists bevore call stat on it.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 2 Jan 2022 08:49:37 +0000 (09:49 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 2 Jan 2022 08:49:37 +0000 (09:49 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index 97bf4d08be43c9976910212c45e198f23e1783f1..e140fb13d2854c040c2133d50faaa84e11cd5153 100644 (file)
@@ -1555,7 +1555,7 @@ sub get_ruleset_date($) {
        my $stored_rulesfile = &_get_dl_rulesfile($provider);
 
        # Check if we got a file.
-       if ($stored_rulesfile) {
+       if (-f $stored_rulesfile) {
                # Call stat on the rulestarball.
                my $stat = stat("$stored_rulesfile");