diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-06-01 08:17:37 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-06-01 08:17:37 -0700 |
commit | c770a0427dfd725c1227cde021b0d6fa9c795300 (patch) | |
tree | 2ed0910b86dfc08f55b91ac040634633b12315a5 | |
parent | 0fe5b72c4c4b5a3a0772eaaba11a412e1a978398 (diff) | |
download | mailscripts-c770a0427dfd725c1227cde021b0d6fa9c795300.tar.gz |
mbox-extract-patch: ensure a blank line before block of trailers
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | mbox-extract-patch | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 6af78cf..2f1d317 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ mailscripts (0.21-1) UNRELEASED; urgency=medium rather than passing the search query directly to `notmuch-show'. That is not how `notmuch-show' is meant to be called and can result in strange behaviour. + * mbox-extract-patch: When inserting trailers, ensure there is a blank + line before the block of trailers. * Add a Homepage: to the Debian packaging metadata (Closes: #961664). Thanks to Daniel Kahn Gillmor for the patch. diff --git a/mbox-extract-patch b/mbox-extract-patch index 276895b..3b80fd1 100755 --- a/mbox-extract-patch +++ b/mbox-extract-patch @@ -178,6 +178,8 @@ package Mail::Message { } } + $lines[$i - 1] =~ /^$/ or unshift @new_ts, "\n"; + splice @lines, $i, 0, @new_ts; my $body = Mail::Message::Body->new( charset => "PERL", |