(void)unlink(cache->filepath);
}
-void mail_cache_set_corrupted(struct mail_cache *cache, const char *fmt, ...)
+void mail_cache_reset(struct mail_cache *cache)
{
- va_list va;
-
mail_cache_unlink(cache);
-
/* mark the cache as unusable */
cache->hdr = NULL;
+}
+
+void mail_cache_set_corrupted(struct mail_cache *cache, const char *fmt, ...)
+{
+ va_list va;
+
+ mail_cache_reset(cache);
va_start(va, fmt);
T_BEGIN {
/* "Error in index cache file %s: ...". */
void mail_cache_set_corrupted(struct mail_cache *cache, const char *fmt, ...)
ATTR_FORMAT(2, 3);
+/* Delete the cache file. */
+void mail_cache_reset(struct mail_cache *cache);
#endif