X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hcache.c;h=7e7334d928e883ed47b3567a2a67fdf46b1e5424;hp=c6892ff55fcef0fa95b04855b7c54fe2b711c214;hb=b0bbf6a87d70ffbff4ab725114c919431c764836;hpb=0ecf3d77dc355f4bea99910a9dfb6f5866c9f73a diff --git a/hcache.c b/hcache.c index c6892ff..7e7334d 100644 --- a/hcache.c +++ b/hcache.c @@ -617,10 +617,7 @@ void * mutt_hcache_open(const char *path, const char *folder) { struct header_cache *h = safe_calloc(1, sizeof (HEADER_CACHE)); - int flags = 0; -#if 0 /* FIXME */ - int pagesize = atoi(HeaderCachePageSize) ? atoi(HeaderCachePageSize) : 16384; -#endif + int flags = VL_OWRITER | VL_OCREAT; h->db = NULL; h->folder = safe_strdup(folder); h->crc = generate_crc32(); @@ -635,14 +632,9 @@ mutt_hcache_open(const char *path, const char *folder) path = mutt_hcache_per_folder(path, folder); if (option(OPTHCACHECOMPRESS)) - flags = VL_OZCOMP; + flags |= VL_OZCOMP; - h->db = vlopen(path, flags | VL_OWRITER | VL_OCREAT, VL_CMPLEX); - if (h->db) - return h; - - /* if rw failed try ro */ - h->db = vlopen(path, flags | VL_OREADER, VL_CMPLEX); + h->db = vlopen(path, flags, VL_CMPLEX); if (h->db) return h; else