From 6c359ae82651d117af71c55ce1e56f3c5db18bfe Mon Sep 17 00:00:00 2001 From: David Levine Date: Mon, 7 Nov 2016 16:28:14 -0500 Subject: [PATCH] Don't parse parse # lines with mhbuild -nodirectives. --- Makefile.am | 2 +- docs/pending-release-notes | 2 ++ uip/mhbuildsbr.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index f1868ec0..3f00dc16 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,7 +73,7 @@ TESTS = test/ali/test-ali test/anno/test-anno \ test/install-mh/test-install-mh test/install-mh/test-version-check \ test/locking/test-datalocking test/locking/test-spoollocking \ test/manpages/test-manpages \ - test/mhbuild/test-attach \ + test/mhbuild/test-attach test/mhbuild/test-mhbuild \ test/mhbuild/test-cte \ test/mhbuild/test-ext-params \ test/mhbuild/test-forw test/mhbuild/test-header-encode \ diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 90b903a7..838ae10b 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -104,3 +104,5 @@ BUG FIXES if needed after decoding text parts. - mhbuild now checks whether all text parts need a Content-Transfer-Encoding header, not just those with a character set not specified. +- mhbuild no longer parses lines that start with # as directives with + -nodirectives. diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index df346fec..cf41bfb1 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -621,7 +621,7 @@ fgetstr (char *s, int n, FILE *stream) if (!fgets (cp, n, stream)) return cp == s ? NULL : s; /* "\\\nEOF" ignored. */ - if (cp == s && *cp != '#') + if (! do_direct() || (cp == s && *cp != '#')) return s; /* Plaintext line. */ len = strlen(cp); -- 2.56.0