diff --git a/imap/imapd.c b/imap/imapd.c index 1aafbdad8a3..4dfee8452fe 100644 --- a/imap/imapd.c +++ b/imap/imapd.c @@ -13582,8 +13582,10 @@ static void list_response(const char *extname, const mbentry_t *mbentry, if (!strcmpsafe(mbentry->name, index_mboxname(imapd_index))) { /* currently selected mailbox */ - if (!index_scan(imapd_index, listargs->scan)) + if (index_refresh(imapd_index) || + !index_scan(imapd_index, listargs->scan)) { return; /* no matching messages */ + } } else { /* other local mailbox */