1 Actually reopen mbox/mmdf files in case we find modifications. Closes
2 http://bugs.mutt.org/2725.
4 Since the file is changed while we have it open in ctx->fp, we likely
5 get wrong information when parsing the mailbox. Now we explicitely close
8 See http://bugs.debian.org/375530 for more info
12 @@ -1119,17 +1119,13 @@
16 - if (fseek (ctx->fp, 0, SEEK_SET) != 0)
18 - dprint (1, (debugfile, "mutt_reopen_mailbox: fseek() failed\n"));
19 + cmp_headers = mbox_strict_cmp_headers;
20 + safe_fclose (&ctx->fp);
21 + if (!(ctx->fp = safe_fopen (ctx->path, "r")))
26 - cmp_headers = mbox_strict_cmp_headers;
28 rc = ((ctx->magic == M_MBOX) ? mbox_parse_mailbox
29 - : mmdf_parse_mailbox) (ctx);
31 + : mmdf_parse_mailbox) (ctx);