Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6224:4e352390abb7 HEAD
Recent flag handling fix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 07 Aug 2007 14:35:34 +0300 |
parents | 895194c5aa2e |
children | 336ad0e3c78f |
files | src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c Tue Aug 07 14:32:56 2007 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Tue Aug 07 14:35:34 2007 +0300 @@ -446,7 +446,10 @@ } } - if (!mail_ctx->recent) + /* mail_ctx->recent is TRUE always if Status: O doesn't exist in the + mbox file. With lazy writes another session could have taken it + already, so we'll also have to check this from index header. */ + if (!mail_ctx->recent || mail->uid < sync_ctx->hdr->first_recent_uid) sync_ctx->last_nonrecent_uid = mail->uid; else index_mailbox_set_recent_uid(&sync_ctx->mbox->ibox, mail->uid);