Skip to content

Commit

Permalink
lib-storage: Don't use mailbox list index if it has refresh_flag set
Browse files Browse the repository at this point in the history
For example if INBOX is deleted, looking up its GUID shouldn't be returned
from the list index since it contains the old GUID.
  • Loading branch information
sirainen committed Jul 12, 2017
1 parent 15ac635 commit 7273d97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib-storage/list/mailbox-list-index-status.c
Expand Up @@ -55,7 +55,11 @@ index_list_open_view(struct mailbox *box, bool status_check,
}

view = mail_index_view_open(ilist->index);
if (!mail_index_lookup_seq(view, node->uid, &seq)) {
if (mailbox_list_index_need_refresh(ilist, view)) {
/* mailbox_list_index_refresh_later() was called.
Can't trust the index's contents. */
ret = 1;
} else if (!mail_index_lookup_seq(view, node->uid, &seq)) {
/* our in-memory tree is out of sync */
ret = 1;
} else if (!status_check) {
Expand Down

0 comments on commit 7273d97

Please sign in to comment.