From afc8e144b48b1841858f57eed485bf97551f7c92 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 8 Jan 2002 13:06:21 +0000 Subject: [PATCH] Try to fix #943. --- mx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mx.c b/mx.c index 213fa6f5d..f0631f488 100644 --- a/mx.c +++ b/mx.c @@ -1185,7 +1185,7 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint) if (ctx->msgcount == ctx->deleted && (ctx->magic == M_MBOX || ctx->magic == M_MMDF) && - !mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY)) + !mutt_is_spool (ctx->path) && !option (OPTSAVEEMPTY)) { unlink (ctx->path); mx_fastclose_mailbox (ctx); @@ -1193,7 +1193,13 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint) } /* if we haven't deleted any messages, we don't need to resort */ - if (purge) + /* ... except for certain folder formats which need "unsorted" + * sort order in order to synchronize folders. + * + * MH and maildir are safe. mbox-style seems to need re-sorting, + * at least with the new threading code. + */ + if (purge || (ctx->magic != M_MAILDIR && ctx->magic != M_MH)) { #ifdef USE_IMAP /* IMAP does this automatically after handling EXPUNGE */ -- 2.40.0