# HG changeset patch # User Timo Sirainen # Date 1186486534 -10800 # Node ID 4e352390abb79faabd6136812e9408d54e1b0193 # Parent 895194c5aa2ea9d0fe013d6582a8bb9df9bbe46c Recent flag handling fix. diff -r 895194c5aa2e -r 4e352390abb7 src/lib-storage/index/mbox/mbox-sync.c --- 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);