dovecot-2.2: lib-storage: Update private index before updating s...

dovecot at dovecot.org dovecot at dovecot.org
Sun Aug 12 07:21:12 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/ab27926cb173
changeset: 14876:ab27926cb173
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Aug 12 07:21:00 2012 +0300
description:
lib-storage: Update private index before updating saved search results.

diffstat:

 src/lib-storage/index/index-sync.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 2e88cfd8b595 -r ab27926cb173 src/lib-storage/index/index-sync.c
--- a/src/lib-storage/index/index-sync.c	Sun Aug 12 06:26:35 2012 +0300
+++ b/src/lib-storage/index/index-sync.c	Sun Aug 12 07:21:00 2012 +0300
@@ -382,6 +382,12 @@
 	if (status_r != NULL)
 		status_r->sync_delayed_expunges = delayed_expunges;
 
+	/* sync private index if needed. do this after real sync to make sure
+	   that all the new messages are added to the private index, so their
+	   flags can be updated. */
+	(void)index_storage_mailbox_sync_pvt(_ctx->box);
+
+	/* update search results after private index is updated */
 	index_sync_search_results_update(ctx);
 
 	if (array_is_created(&ctx->flag_updates))
@@ -391,10 +397,6 @@
 	if (array_is_created(&ctx->all_flag_update_uids))
 		array_free(&ctx->all_flag_update_uids);
 
-	/* sync private index if needed. do this last to make sure that all
-	   the new messages are added to the private index, so their flags can
-	   be updated. */
-	(void)index_storage_mailbox_sync_pvt(_ctx->box);
 	i_free(ctx);
 	return ret;
 }


More information about the dovecot-cvs mailing list