diff options
author | Eric Wong <e@80x24.org> | 2019-11-08 20:20:18 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-08 20:21:01 +0000 |
commit | 118ec03fd467173c401518becd54b621f9abb080 (patch) | |
tree | 20d2e1ee61c05d5a16a80002b9d5c9a4f0f8805a /script/public-inbox-edit | |
parent | 59cfad2031b5e9c86206e4a1562a84d2b549bf69 (diff) | |
download | public-inbox-118ec03fd467173c401518becd54b621f9abb080.tar.gz |
We need to check every print to a regular file for errors, because storage devices inevitably fail.
Diffstat (limited to 'script/public-inbox-edit')
-rwxr-xr-x | script/public-inbox-edit | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/public-inbox-edit b/script/public-inbox-edit index 24b7ed8b..43ce9900 100755 --- a/script/public-inbox-edit +++ b/script/public-inbox-edit @@ -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 |