unsigned int newMailCount;
IMAP_CACHE cache[IMAP_CACHE_LEN];
#ifdef USE_HCACHE
- unsigned long uid_validity;
+ long uid_validity;
#endif
/* all folder flags - system flags AND keywords */
#include "imap_private.h"
#include "message.h"
-#ifdef HAVE_PGP
-#include "pgp.h"
-#endif
-
static void flush_buffer (char *buf, size_t * len, CONNECTION * conn);
static int msg_fetch_header (CONTEXT * ctx, IMAP_HEADER * h, char *buf,
FILE * fp);
** be a single global header cache. By default it is \fIunset\fP so no
** header caching will be used.
*/
- {"maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, "yes" },
- /*
- ** .pp
- ** Availability: Header Cache
- **
- ** .pp
- ** Check for Maildir unaware programs other than Madmutt having modified maildir
- ** files when the header cache is in use. This incurs one \fTstat(2)\fP per
- ** message every time the folder is opened.
- */
#if defined(HAVE_GDBM)
{"header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, "16384"},
/*
snprintf (fn, sizeof (fn), "%s/%s", ctx->path, p->h->path);
#ifdef USE_HCACHE
- if (option (OPTHCACHEVERIFY)) {
- ret = stat (fn, &lastchanged);
- }
- else {
- lastchanged.st_mtime = 0;
- ret = 0;
- }
-
- if (data != NULL && !ret && lastchanged.st_mtime <= when->tv_sec) {
+ ret = stat(fn, &lastchanged);
+ if (data && !ret && lastchanged.st_mtime <= when->tv_sec) {
p->h = mutt_hcache_restore(data, &p->h);
maildir_parse_flags (p->h, fn);
- }
- else
+ } else
#endif
if (maildir_parse_message (ctx->magic, fn, p->h->old, p->h)) {
p->header_parsed = 1;
#ifdef USE_HCACHE
mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen);
#endif
- }
- else
+ } else {
header_delete(&p->h);
+ }
#ifdef USE_HCACHE
p_delete(&data);
#endif
OPTFORCENAME,
OPTFORWDECODE,
OPTFORWQUOTE,
-#ifdef USE_HCACHE
- OPTHCACHEVERIFY,
#ifdef HAVE_QDBM
OPTHCACHECOMPRESS,
-#endif /* HAVE_QDBM */
#endif
OPTHDRS,
OPTHEADER,