From 82e118b8f333d63742ddbc8f9cf995b1f1c12643 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 16 Dec 2020 23:56:29 +0000 Subject: inbox: ->uidvalidity returns undef w/o ->mm While totally unindexed inboxes are rare, we still support them for v1 and may hit code which calls this method. Just return `undef' when ->mm access fails. --- lib/PublicInbox/Inbox.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Inbox.pm') diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 4e3c23f3..bd1de0a0 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -426,7 +426,7 @@ sub on_unlock { } } -sub uidvalidity { $_[0]->{uidvalidity} //= $_[0]->mm->created_at } +sub uidvalidity { $_[0]->{uidvalidity} //= eval { $_[0]->mm->created_at } } sub eidx_key { $_[0]->{newsgroup} // $_[0]->{inboxdir} } -- cgit v1.2.3-24-ge0c7