changeset 9526:a1177c6cf8c7 HEAD

maildir: dropping expunged uidlist records didn't update hash table.
author Timo Sirainen <tss@iki.fi>
date Wed, 20 Jan 2010 11:44:06 +0200
parents 64b8fe0024ba
children 2a7efac89339
files src/lib-storage/index/maildir/maildir-uidlist.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Tue Jan 19 15:45:07 2010 +0200
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Wed Jan 20 11:44:06 2010 +0200
@@ -1248,6 +1248,7 @@
 		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
@@ -1260,8 +1261,10 @@
 	}
 
 	/* 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++)