about summary refs log tree commit homepage
path: root/lib/PublicInbox/IMAP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-07-08 11:36:37 +0000
committerEric Wong <e@80x24.org>2022-07-08 12:16:39 +0000
commitf7963248263d6c115275b2974ae02b424415f37b (patch)
treeb6b3cff50ac4fa082cdf08ad00b51e34f5a6b84c /lib/PublicInbox/IMAP.pm
parent6313d8bbc5f3816eb4936443fca57b411f4f6286 (diff)
downloadpublic-inbox-f7963248263d6c115275b2974ae02b424415f37b.tar.gz
This only affects the rarely-used STATUS command, our message
count was consistely zero due to misusing ->imap_exists.

Noticed while implementing POP3 server.
Diffstat (limited to 'lib/PublicInbox/IMAP.pm')
-rw-r--r--lib/PublicInbox/IMAP.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm
index d47e4c2f..7e695fd8 100644
--- a/lib/PublicInbox/IMAP.pm
+++ b/lib/PublicInbox/IMAP.pm
@@ -399,7 +399,8 @@ sub inbox_lookup ($$;$) {
                         $self->{ibx} = $ibx;
                         $self->{uo2m} = uo2m_ary_new($self, \$exists);
                 } else {
-                        $exists = $over->imap_exists;
+                        my $uid_end = $uid_base + UID_SLICE;
+                        $exists = $over->imap_exists($uid_base, $uid_end);
                 }
                 ensure_slices_exist($self->{imapd}, $ibx, $over->max);
         } else {