]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: Fixed creating new mailboxes.
authorTimo Sirainen <tss@iki.fi>
Thu, 4 Jun 2009 16:45:33 +0000 (12:45 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 4 Jun 2009 16:45:33 +0000 (12:45 -0400)
--HG--
branch : HEAD

src/lib-storage/index/dbox/dbox-storage.c

index e7ec89d53af66cd5c0299761cf4f63678ffa24cd..4129b0dc6b1c66c3f7793f2031e71c76de884f77 100644 (file)
@@ -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));