]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't set any default cache_fields when building index into memory.
authorTimo Sirainen <tss@iki.fi>
Wed, 16 Apr 2003 20:26:11 +0000 (23:26 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 16 Apr 2003 20:26:11 +0000 (23:26 +0300)
--HG--
branch : HEAD

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

index b0e67bb8ad7e642723de1ca6141f86f0598603bc..aab06f450a390a24018f40f47ff97c8bb0056a20 100644 (file)
@@ -241,8 +241,11 @@ void mail_index_init_header(struct mail_index *index,
           when it succeeds */
        hdr->flags = MAIL_INDEX_FLAG_REBUILD;
 
-       /* set the fields we always want to cache */
-       hdr->cache_fields |= index->default_cache_fields;
+       if (!index->anon_mmap) {
+               /* set the fields we always want to cache,
+                  but not if we're building into memory */
+               hdr->cache_fields |= index->default_cache_fields;
+       }
 
        hdr->used_file_size = sizeof(struct mail_index_header);
        hdr->uid_validity = ioloop_time;