Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-index/mbox/mbox-rewrite.c @ 629:2f3b2a5d74d7 HEAD
If first message with our X-IMAPbase is deleted, make sure it's added back.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Nov 2002 19:06:46 +0200 |
parents | b69e50478671 |
children | 5f5fdc45c19d |
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-rewrite.c Wed Nov 20 18:59:10 2002 +0200 +++ b/src/lib-index/mbox/mbox-rewrite.c Wed Nov 20 19:06:46 2002 +0200 @@ -393,6 +393,9 @@ return ret; } +#define INDEX_DIRTY_FLAGS \ + (MAIL_INDEX_FLAG_DIRTY_MESSAGES | MAIL_INDEX_FLAG_DIRTY_CUSTOMFLAGS) + int mbox_index_rewrite(MailIndex *index) { /* Write messages beginning from the first dirty one to temp file, @@ -412,7 +415,7 @@ if (!index->set_lock(index, MAIL_LOCK_SHARED)) return FALSE; - rewrite = (index->header->flags & MAIL_INDEX_FLAG_DIRTY_MESSAGES); + rewrite = (index->header->flags & INDEX_DIRTY_FLAGS); if (!index->set_lock(index, MAIL_LOCK_UNLOCK)) return FALSE; @@ -435,8 +438,7 @@ if (inbuf == NULL) break; - if ((index->header->flags & - MAIL_INDEX_FLAG_DIRTY_MESSAGES) == 0) { + if ((index->header->flags & INDEX_DIRTY_FLAGS) == 0) { /* fsck() figured out there's no dirty messages after all */ failed = FALSE; rewrite = FALSE;