]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
bugfixes
authorTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2003 17:45:53 +0000 (20:45 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 5 Oct 2003 17:45:53 +0000 (20:45 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-open.c
src/lib-index/mbox/mbox-rewrite.c

index f66b67e81bbcc4c1be6ab4eccd5a7bb6bfac3306..a728a107f192dd98a268b5d6c27e2255205e20d3 100644 (file)
@@ -80,6 +80,10 @@ static int index_open_and_fix(struct mail_index *index,
        if (!mail_cache_open_or_create(index))
                return FALSE;
 
+       /* custom flags file needs to be open before rebuilding index */
+       if (!mail_custom_flags_open_or_create(index))
+               return FALSE;
+
        if ((index->header->flags & MAIL_INDEX_HDR_FLAG_REBUILD) != 0 ||
            (index->set_flags & MAIL_INDEX_HDR_FLAG_REBUILD) != 0) {
 
@@ -97,10 +101,6 @@ static int index_open_and_fix(struct mail_index *index,
                rebuilt = FALSE;
        }
 
-       /* custom flags file needs to be open before rebuilding index */
-       if (!mail_custom_flags_open_or_create(index))
-               return FALSE;
-
        if ((flags & _MAIL_INDEX_OPEN_FLAG_CREATING) == 0) {
                if (!mail_modifylog_open_or_create(index))
                        return FALSE;
index 6b80fa87d59679368e345ceb71c7f8003f38122f..3de730763acb75ac40922f5042824f6b43db4856 100644 (file)
@@ -44,6 +44,10 @@ static int reset_dirty_flags(struct mail_index *index)
        struct mail_index_record *rec;
        enum mail_index_record_flag index_flags;
 
+       if (mail_cache_lock(index->cache, FALSE) <= 0)
+               return FALSE;
+       mail_cache_unlock_later(index->cache);
+
        rec = index->lookup(index, 1);
        while (rec != NULL) {
                index_flags = mail_cache_get_index_flags(index->cache, rec);