about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-04-11 04:51:40 +0000
committerEric Wong <e@80x24.org>2016-04-11 04:57:10 +0000
commitdbdc7a42dd88552371ace8db1ebc46a60dcf658a (patch)
treed8bfbf7585937a5de28fdae9572e073fa1715df4 /lib
parentdea396ae54867cc901d586c8af70d5f9fc14f1a8 (diff)
downloadpublic-inbox-dbdc7a42dd88552371ace8db1ebc46a60dcf658a.tar.gz
This may be necessary for compatibility with non-mboxrd aware
parsers which expect "\nFrom " for everything but the first
record.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Mbox.pm4
1 files changed, 1 insertions, 3 deletions
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 {