Move the mutt_sb_set_buffystats() call from mx_fastclose_mailbox() to
the bottom of mx_close_mailbox(). Append-only mailboxes don't have
msgcount set, so fastclose was the wrong place to be doing these
updates.
mutt_clear_threads (ctx);
for (i = 0; i < ctx->msgcount; i++)
mutt_free_header (&ctx->hdrs[i]);
-#ifdef USE_SIDEBAR
- ctx->msgcount -= ctx->deleted;
- mutt_sb_set_buffystats (ctx);
-#endif
FREE (&ctx->hdrs);
FREE (&ctx->v2r);
FREE (&ctx->path);
!mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
mx_unlink_empty (ctx->path);
+#ifdef USE_SIDEBAR
+ ctx->msgcount -= ctx->deleted;
+ mutt_sb_set_buffystats (ctx);
+#endif
+
mx_fastclose_mailbox (ctx);
return 0;