about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-16 23:56:29 +0000
committerEric Wong <e@80x24.org>2020-12-17 10:02:35 +0000
commit82e118b8f333d63742ddbc8f9cf995b1f1c12643 (patch)
tree30aca30cf7d57923393047897348de2f9116b641 /lib/PublicInbox/Inbox.pm
parent6e0c641338c00007b30af3b9b18390e587e4fc29 (diff)
downloadpublic-inbox-82e118b8f333d63742ddbc8f9cf995b1f1c12643.tar.gz
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.
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm2
1 files changed, 1 insertions, 1 deletions
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} }