summaryrefslogtreecommitdiffstats
path: root/mh.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-12-08 10:21:44 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-12-08 10:21:44 +0000
commit7f02ee945ef6c72818234e0c01f023533d00a57f (patch)
tree7e19bf4d20ecaf8acfe5df9177f68df59ab1e882 /mh.c
parentbe46d1117f33f4a8d4bfc0df62bce8c45bd2f7bf (diff)
Keep track of file name changes for files wandering around between
the subfolders of a maildir.
Diffstat (limited to 'mh.c')
-rw-r--r--mh.c13
1 files 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;