diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index b2e1a5520..64d98a388 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -1512,15 +1512,15 @@ sub get_ruleset_date($) { # Get timestamp the file creation. my $mtime = $stat->mtime; + # Check if the timestamp has not been grabbed. + unless ($mtime) { + # Return N/A for Not available. + return "N/A"; + } + # Convert into human read-able format. $date = strftime('%Y-%m-%d %H:%M:%S', localtime($mtime)); - # Check if a date has been obtained. - unless ($date) { - # Assign N/A for Not available. - $date = "N/A"; - } - # Return the date. return $date; }