changeset 6846:61a764835d40 HEAD

Don't add virtual size to uidlist if it's already in filename.
author Timo Sirainen <tss@iki.fi>
date Fri, 23 Nov 2007 12:19:49 +0200
parents b2ec808acd76
children 04809db163ab
files src/lib-storage/index/maildir/maildir-mail.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-mail.c	Fri Nov 23 12:18:08 2007 +0200
+++ b/src/lib-storage/index/maildir/maildir-mail.c	Fri Nov 23 12:19:49 2007 +0200
@@ -259,8 +259,12 @@
 	if ((mail->data.dont_cache_fetch_fields & MAIL_FETCH_VIRTUAL_SIZE) != 0)
 		return;
 
-	if (quick_check && maildir_quick_virtual_size_lookup(mail) > 0)
+	if (quick_check && maildir_quick_virtual_size_lookup(mail) > 0) {
+		/* already in filename / uidlist. don't add it anywhere,
+		   including to the uidlist if it's already in filename. */
 		mail->data.dont_cache_fetch_fields |= MAIL_FETCH_VIRTUAL_SIZE;
+		return;
+	}
 
 	/* 1 = pop3-only, 0 = mixed, -1 = no pop3 */
 	pop3_state = maildir_get_pop3_state(mail);