From 7f02ee945ef6c72818234e0c01f023533d00a57f Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 8 Dec 1998 10:21:44 +0000 Subject: [PATCH] Keep track of file name changes for files wandering around between the subfolders of a maildir. --- mh.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mh.c b/mh.c index 5f14ffde..cf678f45 100644 --- a/mh.c +++ b/mh.c @@ -739,6 +739,12 @@ int mh_check_mailbox(CONTEXT *ctx, int *index_hint) ctx->hdrs[i]->old ? "O" : "", ctx->hdrs[i]->read ? "R" : "")); + if(mutt_strcmp(ctx->hdrs[i]->path, p->h->path)) + { + safe_free((void **) &ctx->hdrs[i]->path); + ctx->hdrs[i]->path = safe_strdup(p->h->path); + } + if(modified) { if(!ctx->hdrs[i]->changed) @@ -748,14 +754,7 @@ int mh_check_mailbox(CONTEXT *ctx, int *index_hint) mutt_set_flag (ctx, ctx->hdrs[i], M_READ, p->h->read); } - /* - * This flag relates to file positions for maildir folders, - * so we _must_ use the modified folder's value here. - * Otherwise, the mail folder will appear to be corrupted. - */ - mutt_set_flag(ctx, ctx->hdrs[i], M_OLD, p->h->old); - } ctx->hdrs[i]->active = 1; -- 2.40.0