Skip to content

Commit

Permalink
lib-storage: Fix error handling if mailbox list index refresh fails
Browse files Browse the repository at this point in the history
The caller expects the error to be in mail_storage, not mailbox_list.
  • Loading branch information
sirainen authored and villesavolainen committed Feb 6, 2019
1 parent 1f9bb88 commit b96cc99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib-storage/list/mailbox-list-index-status.c
Expand Up @@ -44,8 +44,10 @@ index_list_open_view(struct mailbox *box, bool status_check,

if (MAILBOX_IS_NEVER_IN_INDEX(box) && status_check)
return 0;
if (mailbox_list_index_refresh(box->list) < 0)
if (mailbox_list_index_refresh(box->list) < 0) {
mail_storage_copy_list_error(box->storage, box->list);
return -1;
}

node = mailbox_list_index_lookup(box->list, box->name);
if (node == NULL) {
Expand Down

0 comments on commit b96cc99

Please sign in to comment.