int deleted;
int n;
int rc;
-
+#if USE_HCACHE
+ void* hc = NULL;
+ char uidbuf[32];
+#endif
+
idata = (IMAP_DATA*) ctx->data;
if (idata->state < IMAP_SELECTED)
}
}
+
+#if USE_HCACHE
+ if (expunge && ctx->closing)
+ hc = mutt_hcache_open (HeaderCache, idata->ctx->path);
+#endif
+
/* save messages with real (non-flag) changes */
for (n = 0; n < ctx->msgcount; n++)
{
+#if USE_HCACHE
+ if (hc && ctx->hdrs[n]->deleted)
+ {
+ sprintf (uidbuf, "/%u", HEADER_DATA(ctx->hdrs[n])->uid);
+ mutt_hcache_delete (hc, uidbuf, imap_hcache_keylen);
+ }
+#endif
if (ctx->hdrs[n]->active && ctx->hdrs[n]->changed)
{
/* if the message has been rethreaded or attachments have been deleted
rc = 0;
out:
+#if USE_HCACHE
+ mutt_hcache_close (hc);
+#endif
if (cmd.data)
FREE (&cmd.data);
if (appendctx)