From: Eric Wong Date: Mon, 11 Apr 2016 04:51:40 +0000 (+0000) Subject: mbox: unconditionally add trailing newline X-Git-Tag: v1.0.0~614 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=dbdc7a42dd88552371ace8db1ebc46a60dcf658a;p=public-inbox.git mbox: unconditionally add trailing newline This may be necessary for compatibility with non-mboxrd aware parsers which expect "\nFrom " for everything but the first record. --- diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm index 0d67981f..9f20580e 100644 --- a/lib/PublicInbox/Mbox.pm +++ b/lib/PublicInbox/Mbox.pm @@ -67,9 +67,7 @@ sub emit_msg { # ref: http://www.qmail.org/man/man5/mbox.html $buf =~ s/^(>*From )/>$1/gm; - $buf .= "\n" unless $buf =~ /\n\z/s; - - $fh->write($buf); + $fh->write($buf .= "\n"); } sub emit_mbox {