From dbdc7a42dd88552371ace8db1ebc46a60dcf658a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 11 Apr 2016 04:51:40 +0000 Subject: 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. --- lib/PublicInbox/Mbox.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/PublicInbox/Mbox.pm') 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 { -- cgit v1.2.3-24-ge0c7