From: Eric Wong (Contractor, The Linux Foundation) Date: Wed, 18 Apr 2018 09:13:12 +0000 (+0000) Subject: import: cat_blob drops leading 'From ' lines like Inbox X-Git-Tag: v1.1.0-pre1~29 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=0bf744b91df2d40580ff5776311d57dcede850b0 import: cat_blob drops leading 'From ' lines like Inbox In case people were running old buggy versions from 2016... (and -convert should probably clean those up, eventually) --- diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index c7a96e1e..b25427ee 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -117,6 +117,9 @@ sub _cat_blob ($$$) { $n = read($r, my $lf, 1); defined($n) or die "read final byte of cat-blob failed: $!"; die "bad read on final byte: <$lf>" if $lf ne "\n"; + + # fixup some bugginess in old versions: + $buf =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s; \$buf; }