From: Timo Sirainen Date: Thu, 17 Dec 2009 19:00:30 +0000 (-0500) Subject: imap: Refresh index before starting a FETCH, so it sees updated flags immediately. X-Git-Tag: 2.0.beta2~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75d03475effdfaaf9bbf5fdb07b056bca62f14c1;p=thirdparty%2Fdovecot%2Fcore.git imap: Refresh index before starting a FETCH, so it sees updated flags immediately. --HG-- branch : HEAD --- diff --git a/src/imap/imap-fetch.c b/src/imap/imap-fetch.c index 19e8b79839..b16842b3d0 100644 --- a/src/imap/imap-fetch.c +++ b/src/imap/imap-fetch.c @@ -340,7 +340,8 @@ int imap_fetch_begin(struct imap_fetch_context *ctx) ctx->fetch_data |= MAIL_FETCH_NUL_STATE; ctx->trans = mailbox_transaction_begin(ctx->box, - MAILBOX_TRANSACTION_FLAG_HIDE); + MAILBOX_TRANSACTION_FLAG_HIDE | + MAILBOX_TRANSACTION_FLAG_REFRESH); ctx->select_counter = ctx->client->select_counter; ctx->mail = mail_alloc(ctx->trans, ctx->fetch_data, ctx->all_headers_ctx);