about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwAtomStream.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-05 23:27:34 +0000
committerEric Wong <e@yhbt.net>2020-07-06 20:01:15 +0000
commitc6eb69349c32d9a749a5878364c427745bce3d1b (patch)
treec8b0b23d5018b9e918ee1db9858939e1f1606ed4 /lib/PublicInbox/WwwAtomStream.pm
parentc447bbbddb4ac8e1e9b7c35a15c09776d18501db (diff)
downloadpublic-inbox-c6eb69349c32d9a749a5878364c427745bce3d1b.tar.gz
wwwatomstream: use PublicInbox::Inbox->modified for feed_updated
stat(2) on the inboxdir is unlikely to be correct, now that
msgmap truncates its journal (rather than unlinking it).
Diffstat (limited to 'lib/PublicInbox/WwwAtomStream.pm')
-rw-r--r--lib/PublicInbox/WwwAtomStream.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm
index c494fa22..35b536c1 100644
--- a/lib/PublicInbox/WwwAtomStream.pm
+++ b/lib/PublicInbox/WwwAtomStream.pm
@@ -93,8 +93,6 @@ sub atom_header {
                 $self_url .= 'new.atom';
                 $page_id = "mailto:$ibx->{-primary_address}";
         }
-        my $mtime = (stat($ibx->{inboxdir}))[9] || time;
-
         qq(<?xml version="1.0" encoding="us-ascii"?>\n) .
         qq(<feed\nxmlns="http://www.w3.org/2005/Atom"\n) .
         qq(xmlns:thr="http://purl.org/syndication/thread/1.0">) .
@@ -103,7 +101,7 @@ sub atom_header {
                 qq(\nhref="$base_url"/>) .
         qq(<link\nrel="self"\nhref="$self_url"/>) .
         qq(<id>$page_id</id>) .
-        feed_updated($mtime);
+        feed_updated($ibx->modified);
 }
 
 # returns undef or string