From 8816336b59c9dd0b26c8620668a01b66c0818a1e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Oct 2022 08:43:09 +0000 Subject: clone|fetch: preserve mtime of modified manifest.js.gz When we cull manifest.js.gz for ignored epochs, attempt to preserve mtime of the updated manifest.js.gz since it can be used to optimize future fetches. --- lib/PublicInbox/Fetch.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/PublicInbox/Fetch.pm') diff --git a/lib/PublicInbox/Fetch.pm b/lib/PublicInbox/Fetch.pm index 5261cad1..364271e8 100644 --- a/lib/PublicInbox/Fetch.pm +++ b/lib/PublicInbox/Fetch.pm @@ -221,7 +221,9 @@ EOM if ($mculled) { my $json = PublicInbox::Config->json->encode($m1); my $fn = $ft->filename; + my $mtime = (stat($fn))[9]; gzip(\$json => $fn) or die "gzip: $GzipError"; + utime($mtime, $mtime, $fn) or die "utime(..., $fn): $!"; } PublicInbox::LeiMirror::ft_rename($ft, $mf, 0666); } -- cgit v1.2.3-24-ge0c7