X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mx%2Fhcache.c;h=c3fca8dd71b248f72c277a7578c9570a6f9f6e1f;hp=76e4a830bd9398abec4aafc9ad24aa84872a3ce2;hb=da04d632587a221112a0f065e4802e1ea5393e21;hpb=9946738a6a1c27a5602a14d1afe2eea2389732b2 diff --git a/lib-mx/hcache.c b/lib-mx/hcache.c index 76e4a83..c3fca8d 100644 --- a/lib-mx/hcache.c +++ b/lib-mx/hcache.c @@ -281,7 +281,6 @@ static void dump_envelope(buffer_t *buf, ENVELOPE * e) dump_cstr(buf, e->newsgroups); dump_cstr(buf, e->xref); dump_cstr(buf, e->followup_to); - dump_cstr(buf, e->x_comment_to); #endif dump_list(buf, e->references); @@ -319,7 +318,6 @@ static const void *restore_envelope(const char *d, ENVELOPE *e) d = restore_cstr(d, &e->newsgroups); d = restore_cstr(d, &e->xref); d = restore_cstr(d, &e->followup_to); - d = restore_cstr(d, &e->x_comment_to); #endif d = restore_list(d, &e->references); @@ -377,20 +375,20 @@ HEADER *mutt_hcache_restore(const void *_d, HEADER **oh) /* }}} */ -hcache_t *mutt_hcache_open(const char *path, const char *folder) +hcache_t *mutt_hcache_open(const char *folder) { - hcache_t *h = p_new(hcache_t, 1); + const char *path; + hcache_t *h; - h->folder = m_strdup(folder); - h->crc = generate_crc32(); - - if (m_strisempty(path)) { - p_delete(&h->folder); - p_delete(&h); + if (m_strisempty(mod_core.cachedir)) { return NULL; } - path = mutt_hcache_per_folder(path, folder); + h = p_new(hcache_t, 1); + h->folder = m_strdup(folder); + h->crc = generate_crc32(); + + path = mutt_hcache_per_folder(mod_core.cachedir, folder); { #if defined(HAVE_QDBM)