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

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 25 16:10:16 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/f7fce2f2175f
changeset: 8345:f7fce2f2175f
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 25 09:08:11 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 d3246f9fbfcf -r f7fce2f2175f src/lib-storage/index/maildir/maildir-sync.c
--- a/src/lib-storage/index/maildir/maildir-sync.c	Fri Aug 14 13:21:08 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Tue Aug 25 09:08:11 2009 -0400
@@ -653,22 +653,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 (!ctx->mbox->ibox.keep_recent) {
 			*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 (!ctx->mbox->ibox.keep_recent)
 		flags |= MAIL_INDEX_SYNC_FLAG_DROP_RECENT;


More information about the dovecot-cvs mailing list