From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C77851F462; Wed, 12 Jun 2019 00:25:18 +0000 (UTC) Date: Wed, 12 Jun 2019 00:25:18 +0000 From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 15/11] edit: unlink temporary file when done Message-ID: <20190612002518.yztdllsmcjxv5dr6@dcvr> References: <20190609025147.24966-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190609025147.24966-1-e@80x24.org> List-Id: We don't need to leave temporary files lying around. --- script/public-inbox-edit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/public-inbox-edit b/script/public-inbox-edit index 16d7852..2e2c761 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); -- EW