If local indexes had more than 0 mails, but after reconnection the remote
IMAP server replied with "* 0 EXISTS", the mails in local index weren't
expunged. This could have resulted in:
Panic: file imapc-sync.c: line 328 (imapc_initial_sync_check): assertion failed: (mail_index_is_expunged(view, lseq) || seq_range_exists(&ctx->mbox->delayed_expunged_uids, luid))
struct imapc_command *cmd;
if (mbox->exists_count == 0) {
- /* empty mailbox - no point in fetching anything */
- mbox->state_fetched_success = TRUE;
+ /* empty mailbox - no point in fetching anything.
+ just make sure everything is expunged in local index. */
+ mbox->sync_next_lseq = 1;
+ imapc_mailbox_fetch_state_finish(mbox);
return;
}
if (mbox->state_fetching_uid1) {