Skip to content

Commit

Permalink
lib-storage: Re-open mailbox after it's undeleted.
Browse files Browse the repository at this point in the history
This is needed with mailbox formats that didn't fully open the mailbox while
it was undeleted.
  • Loading branch information
sirainen committed Feb 17, 2017
1 parent fdaba55 commit 4decb8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib-storage/mail-storage.c
Expand Up @@ -1179,6 +1179,11 @@ int mailbox_open(struct mailbox *box)
undelete it and reopen. */
if(!mailbox_try_undelete(box))
return -1;

/* make sure we close the mailbox in the middle. some backends
may not have fully opened the mailbox while it was being
undeleted. */
mailbox_close(box);
if (mailbox_open_full(box, NULL) < 0)
return -1;
}
Expand Down

0 comments on commit 4decb8c

Please sign in to comment.