]> granicus.if.org Git - neomutt/commitdiff
Keep track of file name changes for files wandering around between
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 8 Dec 1998 10:21:44 +0000 (10:21 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 8 Dec 1998 10:21:44 +0000 (10:21 +0000)
the subfolders of a maildir.

mh.c

diff --git a/mh.c b/mh.c
index 5f14ffde5950fd2fcfb98c7a99717e2a4f2b63bd..cf678f45b814b59d5db31ece8093b56ac434849b 100644 (file)
--- 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;