]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix mailbox list index records with name_id=0
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 18 May 2017 20:06:20 +0000 (23:06 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 22 May 2017 12:11:54 +0000 (15:11 +0300)
name_id=0 isn't valid, so it needs to be changed and writen to the disk.
The write-to-disk part wasn't working.

src/lib-storage/list/mailbox-list-index.c

index 58e6a01f16525745da46c0260fca3f033b5eefbf..80126154204c1db4e88ec190620d42e5b5ad9d41 100644 (file)
@@ -322,6 +322,7 @@ static int mailbox_list_index_parse_records(struct mailbox_list_index *ilist,
                if (node->name_id == 0) {
                        /* invalid name_id - assign a new one */
                        node->name_id = ++ilist->highest_name_id;
+                       node->corrupted_ext = TRUE;
                }
                node->name = hash_table_lookup(ilist->mailbox_names,
                                               POINTER_CAST(irec->name_id));