dovecot-2.0: maildir: Fixed maildir_sync_get_changes() to work a...

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 25 16:17:05 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/830958d044ec
changeset: 9814:830958d044ec
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 25 09:16:58 2009 -0400
description:
maildir: Fixed maildir_sync_get_changes() to work as it should have.

diffstat:

1 file changed, 5 insertions(+), 7 deletions(-)
src/lib-storage/index/maildir/maildir-sync.c |   12 +++++-------

diffs (31 lines):

diff -r d1cdc927ea3c -r 830958d044ec src/lib-storage/index/maildir/maildir-sync.c
--- a/src/lib-storage/index/maildir/maildir-sync.c	Mon Aug 24 16:58:53 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Tue Aug 25 09:16:58 2009 -0400
@@ -678,22 +678,20 @@ static int maildir_sync_get_changes(stru
 				     new_changed_r, cur_changed_r) < 0)
 		return -1;
 
-	if (*new_changed_r || *cur_changed_r)
-		return 1;
-
 	if (have_recent_messages(ctx)) {
 		if ((mbox->ibox.box.flags & MAILBOX_FLAG_KEEP_RECENT) == 0) {
 			*new_changed_r = TRUE;
-			return 1;
 		} else if (*new_changed_r) {
 			/* we have some recent messages and new/ has changed.
 			   if messages had been externally deleted from new/,
 			   we need to get them out of index. this requires that
 			   we make sure they weren't just moved to cur/. */
 			*cur_changed_r = TRUE;
-			return 1;
-		}
-	}
+		}
+	}
+
+	if (*new_changed_r || *cur_changed_r)
+		return 1;
 
 	if ((mbox->ibox.box.flags & MAILBOX_FLAG_KEEP_RECENT) == 0)
 		flags |= MAIL_INDEX_SYNC_FLAG_DROP_RECENT;


More information about the dovecot-cvs mailing list