MAIL_INDEX_TRANSACTION_FLAG_EXTERNAL);
mail_index_view_close(&sync_view);
+ /* set before any rollbacks are called */
+ index->syncing = TRUE;
+
/* we wish to see all the changes from last mailbox sync position to
the end of the transaction log */
if (mail_index_sync_set_log_view(ctx->view, hdr->log_file_seq,
ctx->ext_trans = mail_index_transaction_begin(ctx->view, trans_flags);
ctx->ext_trans->sync_transaction = TRUE;
- index->syncing = TRUE;
-
*ctx_r = ctx;
*view_r = ctx->view;
*trans_r = ctx->ext_trans;