ipblocklist-functions.pl: Store the local time if no last modified could

be determined.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2022-03-06 15:09:18 +01:00
parent 8d12d12a4f
commit d8113820e3

View File

@@ -188,7 +188,11 @@ sub download_and_create_blocklist($) {
}
# Update the timestamp for the new or modified list.
$modified{$list} = $response->last_modified;
if($response->last_modified) {
$modified{$list} = $response->last_modified;
} else {
$modified{$list} = time();
}
# Write-back the modified timestamps.
&General::writehash($modified_file, \%modified);