Skip to content

Commit

Permalink
imapd.c: need an open mailbox for index_scan()
Browse files Browse the repository at this point in the history
imapd_index is released before every command is parsed
  • Loading branch information
ksmurchison committed Jul 26, 2023
1 parent 789d955 commit ba22b56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imap/imapd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ba22b56

Please sign in to comment.