From: Timo Sirainen Date: Wed, 20 Jan 2010 09:43:49 +0000 (+0200) Subject: maildir: dropping expunged uidlist records didn't update hash table. X-Git-Tag: 2.0.beta2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d55fb5fbf2dc0601fc34dbd26221369b0cedb5da;p=thirdparty%2Fdovecot%2Fcore.git maildir: dropping expunged uidlist records didn't update hash table. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/maildir/maildir-uidlist.c b/src/lib-storage/index/maildir/maildir-uidlist.c index 81fcbacc0a..601499c4fa 100644 --- a/src/lib-storage/index/maildir/maildir-uidlist.c +++ b/src/lib-storage/index/maildir/maildir-uidlist.c @@ -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++)