From: Michael Tremer Date: Sat, 6 Dec 2025 18:52:50 +0000 (+0000) Subject: dnsbl: Set the mtime of the file to when the list was last updated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=138bae6b340614ce98e34a7284d919aa23d4b743;p=dbl.git dnsbl: Set the mtime of the file to when the list was last updated Signed-off-by: Michael Tremer --- diff --git a/src/scripts/dnsbl.in b/src/scripts/dnsbl.in index c628a59..82ac600 100644 --- a/src/scripts/dnsbl.in +++ b/src/scripts/dnsbl.in @@ -296,11 +296,16 @@ class CLI(object): except FileNotFoundError: pass + # Set the modification time (so that clients won't download again + # just because we have done a re-export) + os.utime(f.name, (list.updated_at.timestamp(), list.updated_at.timestamp())) + + # Fix permissions + os.chmod(f.name, 0o644) + # Once the output has been written in full, we will rename the file os.link(f.name, name) - # Fix permissions - os.chmod(name, 0o644) def __add_source(self, backend, args): """