From: Timo Sirainen Date: Thu, 4 Jun 2009 16:45:33 +0000 (-0400) Subject: dbox: Fixed creating new mailboxes. X-Git-Tag: 2.0.alpha1~610 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ffd0148cce5f3338b18bb68e969cf812fa3701b;p=thirdparty%2Fdovecot%2Fcore.git dbox: Fixed creating new mailboxes. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox/dbox-storage.c b/src/lib-storage/index/dbox/dbox-storage.c index e7ec89d53a..4129b0dc6b 100644 --- a/src/lib-storage/index/dbox/dbox-storage.c +++ b/src/lib-storage/index/dbox/dbox-storage.c @@ -205,10 +205,14 @@ static void dbox_write_index_header(struct mailbox *box) struct dbox_index_header hdr; uint32_t uid_validity; + if (dbox_map_open(mbox->storage->map, TRUE) < 0) + return; + trans = mail_index_transaction_begin(mbox->ibox.view, 0); /* set dbox header */ memset(&hdr, 0, sizeof(hdr)); + hdr.map_uid_validity = dbox_map_get_uid_validity(mbox->storage->map); mail_index_update_header_ext(trans, mbox->dbox_hdr_ext_id, 0, &hdr, sizeof(hdr));