]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ipblocklist-functions.pl: Store the local time if no last modified could
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 6 Mar 2022 14:09:18 +0000 (15:09 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 7 May 2022 09:32:27 +0000 (11:32 +0200)
be determined.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ipblocklist-functions.pl

index 284503a02b1b53f6c46c901968d78703b326cf18..cde81684f4a4c51e6feae9b07a5f85186fb89cd4 100644 (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);