Mercurial > dovecot > core-2.2
changeset 10216:e3d0385ce703 HEAD
maildir: mailbox_update() crashed if mailbox wasn't yet open.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 28 Oct 2009 16:01:06 -0400 |
parents | 728a029f56f9 |
children | a553595ce5a9 |
files | src/lib-storage/index/maildir/maildir-storage.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-storage.c Wed Oct 28 14:10:55 2009 -0400 +++ b/src/lib-storage/index/maildir/maildir-storage.c Wed Oct 28 16:01:06 2009 -0400 @@ -507,6 +507,11 @@ struct maildir_uidlist *uidlist = mbox->uidlist; int ret; + if (!box->opened) { + if (mailbox_open(box) < 0) + return -1; + } + if (maildir_uidlist_lock(uidlist) <= 0) return -1;