Andreas Krennmair:
[apps/madmutt.git] / mbox.c
diff --git a/mbox.c b/mbox.c
index dc900e4..dedf7c6 100644 (file)
--- a/mbox.c
+++ b/mbox.c
 #include "sort.h"
 #include "copy.h"
 
+#ifdef USE_COMPRESSED
+#include "compress.h"
+#endif
+
 #include <sys/stat.h>
 #include <dirent.h>
 #include <string.h>
@@ -1016,6 +1020,12 @@ bail:  /* Come here in case of disaster */
 int mbox_close_mailbox (CONTEXT *ctx)
 {
   mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
+
+#ifdef USE_COMPRESSED
+  if (ctx->compressinfo)
+    mutt_slow_close_compressed (ctx);
+#endif
+
   mutt_unblock_signals ();
   mx_fastclose_mailbox (ctx);
   return 0;