]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Handle recent flags in index file correctly. Fixes recent flag losing when
authorTimo Sirainen <tss@iki.fi>
Mon, 12 Jul 2004 08:07:03 +0000 (11:07 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 12 Jul 2004 08:07:03 +0000 (11:07 +0300)
copying or saving mails with flags.

--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-sync.c

index 304a7825458bfc29af66377518184c532b90536c..33bb7589a2f5df5d59f972c369a7d6d73a11402d 100644 (file)
@@ -720,6 +720,17 @@ static int maildir_sync_index(struct maildir_sync_context *ctx)
                        continue;
                }
 
+               if ((rec->flags & MAIL_RECENT) != 0) {
+                       index_mailbox_set_recent(ibox, seq);
+                       if (ibox->keep_recent) {
+                               flags |= MAIL_RECENT;
+                       } else {
+                               mail_index_update_flags(trans, seq,
+                                                       MODIFY_REMOVE,
+                                                       MAIL_RECENT, keywords);
+                       }
+               }
+
                if ((uflags & MAILDIR_UIDLIST_REC_FLAG_NONSYNCED) != 0) {
                        /* partial syncing */
                        continue;