diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-07-28 19:07:06 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-07-28 19:07:06 +0000 |
commit | e504b5f8753ccec72a9a776834f5354911a7a29a (patch) | |
tree | f10d273e0fa9b6c044d6afc919fb27984b23c242 /mh.c | |
parent | d521c03a25a159e5316edf9ed5bf1918b61a0815 (diff) |
Re-parse mh messages when committing them to disk. The structure
may have changed.
Diffstat (limited to 'mh.c')
-rw-r--r-- | mh.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -606,6 +606,8 @@ static int mh_sync_message (CONTEXT *ctx, int msgno) char newpath[_POSIX_PATH_MAX]; char partpath[_POSIX_PATH_MAX]; + FILE *f; + if ((dest = mx_open_new_message (ctx, h, 0)) == NULL) return -1; @@ -651,10 +653,16 @@ static int mh_sync_message (CONTEXT *ctx, int msgno) /* * The message structure and offsets may have changed, so free it - * here. The message will be reparsed later. + * here. */ - mutt_free_body (&h->content->parts); + mutt_free_body (&h->content); + if ((f = fopen (oldpath, "r"))) + { + mutt_free_envelope (&h->env); + h->env = mutt_read_rfc822_header (f, h, 0); + fclose (f); + } return rc; } |