From: Stefan Schantl Date: Sun, 2 Jan 2022 08:49:37 +0000 (+0100) Subject: ids-functions.pl: Check if given filename exists bevore call stat on it. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cad087c74efe8e45d0a8b24365beaa868d1a2913;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Check if given filename exists bevore call stat on it. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 97bf4d08be..e140fb13d2 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -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");