]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
maildir: dropping expunged uidlist records didn't update hash table.
authorTimo Sirainen <tss@iki.fi>
Wed, 20 Jan 2010 09:43:49 +0000 (11:43 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 20 Jan 2010 09:43:49 +0000 (11:43 +0200)
--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-uidlist.c

index 81fcbacc0a3bff7b6a41d3f3d48612635f455355..601499c4fab95ac2873961eba1f4e32c30c425e2 100644 (file)
@@ -1335,6 +1335,7 @@ maildir_uidlist_records_drop_expunges(struct maildir_uidlist *uidlist)
                rec = mail_index_lookup(view, seq);
                if (recs[i]->uid < rec->uid) {
                        /* expunged entry */
+                       hash_table_remove(uidlist->files, recs[i]->filename);
                        i++;
                } else if (recs[i]->uid > rec->uid) {
                        /* index isn't up to date. we're probably just
@@ -1347,8 +1348,10 @@ maildir_uidlist_records_drop_expunges(struct maildir_uidlist *uidlist)
        }
 
        /* drop messages expunged at the end of index */
-       while (i < count && recs[i]->uid < hdr->next_uid)
+       while (i < count && recs[i]->uid < hdr->next_uid) {
+               hash_table_remove(uidlist->files, recs[i]->filename);
                i++;
+       }
        /* view might not be completely up-to-date, so preserve any
           messages left */
        for (; i < count; i++)