diff options
author | Eric Wong <e@80x24.org> | 2022-10-20 08:43:09 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-10-24 08:18:24 +0000 |
commit | 8816336b59c9dd0b26c8620668a01b66c0818a1e (patch) | |
tree | b7a67f869c40484df78a426e7456d6f5ca9d65dc /lib/PublicInbox/Fetch.pm | |
parent | 0881010d123914be5e47544229e2b03412a6a691 (diff) | |
download | public-inbox-8816336b59c9dd0b26c8620668a01b66c0818a1e.tar.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.
Diffstat (limited to 'lib/PublicInbox/Fetch.pm')
-rw-r--r-- | lib/PublicInbox/Fetch.pm | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |