dovecot: Don't add virtual size to uidlist if it's already in fi...

dovecot at dovecot.org dovecot at dovecot.org
Fri Nov 23 12:19:52 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/61a764835d40
changeset: 6846:61a764835d40
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Nov 23 12:19:49 2007 +0200
description:
Don't add virtual size to uidlist if it's already in filename.

diffstat:

1 file changed, 5 insertions(+), 1 deletion(-)
src/lib-storage/index/maildir/maildir-mail.c |    6 +++++-

diffs (17 lines):

diff -r b2ec808acd76 -r 61a764835d40 src/lib-storage/index/maildir/maildir-mail.c
--- 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 @@ maildir_handle_virtual_size_caching(stru
 	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);


More information about the dovecot-cvs mailing list