From f0f430bbeca7cab49210fc93c2bc8aadb7757038 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Sat, 2 Feb 2002 09:19:08 +0000 Subject: [PATCH] Don't forget deletions when a folder is changed. Ups. --- mh.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mh.c b/mh.c index f8963a59..85d6e8db 100644 --- a/mh.c +++ b/mh.c @@ -1370,13 +1370,6 @@ static void maildir_update_flags (CONTEXT *ctx, HEADER *o, HEADER *n) mutt_set_flag (ctx, o, M_READ, n->read); mutt_set_flag (ctx, o, M_OLD, n->old); - /* Currently, this only plays a role with maildir. */ - if (ctx->magic == M_MAILDIR) - { - mutt_set_flag (ctx, o, M_DELETE, n->deleted); - o->trash = n->trash; - } - /* mutt_set_flag() will set this, but we don't need to * sync the changes we made because we just updated the * context to match the current on-disk state of the @@ -1489,6 +1482,10 @@ int maildir_check_mailbox (CONTEXT * ctx, int *index_hint) if (!ctx->hdrs[i]->changed) maildir_update_flags (ctx, ctx->hdrs[i], p->h); + if (ctx->hdrs[i]->deleted == ctx->hdrs[i]->trash) + ctx->hdrs[i]->deleted = p->h->deleted; + ctx->hdrs[i]->trash = p->h->trash; + /* this is a duplicate of an existing header, so remove it */ mutt_free_header (&p->h); } -- 2.50.1