* [PATCH] inbox: ->uidvalidity returns undef w/o ->mm
@ 2020-12-16 23:56 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-12-16 23:56 UTC (permalink / raw)
To: meta
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(-)
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 586bd561..6811c456 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -431,7 +431,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} }
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-16 23:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 23:56 [PATCH] inbox: ->uidvalidity returns undef w/o ->mm Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).