]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: If index is read-only, always fail when trying to lock cache file.
authorTimo Sirainen <tss@iki.fi>
Mon, 31 May 2010 19:34:42 +0000 (20:34 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 31 May 2010 19:34:42 +0000 (20:34 +0100)
--HG--
branch : HEAD

src/lib-index/mail-cache.c

index 73c8ab00cb96690c2281e694abb4d54e2bfd918d..d71253c54cb06125573d2baed96c40f533124ee4 100644 (file)
@@ -551,7 +551,8 @@ mail_cache_lock_full(struct mail_cache *cache, bool require_same_reset_id,
                (void)mail_cache_open_and_verify(cache);
 
        if (MAIL_CACHE_IS_UNUSABLE(cache) ||
-           MAIL_INDEX_IS_IN_MEMORY(cache->index))
+           MAIL_INDEX_IS_IN_MEMORY(cache->index) ||
+           cache->index->readonly)
                return 0;
 
        iview = mail_index_view_open(cache->index);