]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-edit
edit: check for write errors writing "From_" line
[public-inbox.git] / script / public-inbox-edit
index 24b7ed8b2d220bb7a1bc090c7228e2a7fb608e21..43ce9900eff3aa06f0d15fc35937adcbc2795d1b 100755 (executable)
@@ -130,7 +130,8 @@ foreach my $to_edit (values %$found) {
        my $tmp = $$old_raw;
        if (!$opt->{raw}) {
                my $oid = $smsg->{blob};
-               print $edit_fh "From mboxrd\@$oid Thu Jan  1 00:00:00 1970\n";
+               print $edit_fh "From mboxrd\@$oid Thu Jan  1 00:00:00 1970\n"
+                       or die "failed to write From_ line: $!";
                $tmp =~ s/^(>*From )/>$1/gm;
        }
        print $edit_fh $tmp or