From: Eric Wong (Contractor, The Linux Foundation) Date: Tue, 11 Jun 2019 18:34:58 +0000 (+0000) Subject: edit: unlink temporary file when done X-Git-Tag: v1.2.0~179^2 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=3fd2143efc1c96f0000af2ae7a6dee0990337fc4 edit: unlink temporary file when done We don't need to leave temporary files lying around. --- diff --git a/script/public-inbox-edit b/script/public-inbox-edit index 16d78529..2e2c7616 100755 --- a/script/public-inbox-edit +++ b/script/public-inbox-edit @@ -121,7 +121,7 @@ $mids my $tmpl = 'public-inbox-edit-XXXXXX'; foreach my $to_edit (values %$found) { - my ($edit_fh, $edit_fn) = tempfile($tmpl, TMPDIR => 1); + my ($edit_fh, $edit_fn) = tempfile($tmpl, TMPDIR => 1, UNLINK => 1); $edit_fh->autoflush(1); my ($ibx, $smsg) = @{$to_edit->[0]}; my $old_raw = $ibx->msg_by_smsg($smsg);