From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 197F41F56B for ; Sun, 1 Oct 2023 09:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696154071; bh=AmnnAYm5vpAWTJNIqs34OsQGqeNohL/xf8A8kcyz780=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MyYlzRN822Z5jsip2h1SCqf0RPru9AKnbNZTsDhuH4qPNpSTr7Uxs3ibwZtN5tCs4 tl/2tsg6RB26fJkdL9P/gxboNovPFmfpkvVDv8FNzxkXUxEyQRvsfziUpIYUuZsVSg FFm8y+Ur1oOAHSgOOZPpkQcZNxUwiCIQwG7kZJOE= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 08/13] lei mail-diff: don't remove temporary subdirectory Date: Sun, 1 Oct 2023 09:54:24 +0000 Message-ID: <20231001095429.2092610-9-e@80x24.org> In-Reply-To: <20231001095429.2092610-1-e@80x24.org> References: <20231001095429.2092610-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: ->{curdir} is localized inside MailDiff->dump_eml anyways, so it was attempting to remove `undef' :x. Since most messages don't have too many attachments, save some opcodes on our end and just let File::Temp::Dir->DESTROY handle all the cleanup. --- lib/PublicInbox/LeiMailDiff.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/PublicInbox/LeiMailDiff.pm b/lib/PublicInbox/LeiMailDiff.pm index 5e2e4b0b..af6ecf82 100644 --- a/lib/PublicInbox/LeiMailDiff.pm +++ b/lib/PublicInbox/LeiMailDiff.pm @@ -7,7 +7,6 @@ package PublicInbox::LeiMailDiff; use v5.12; use parent qw(PublicInbox::IPC PublicInbox::LeiInput PublicInbox::MailDiff); use PublicInbox::Spawn qw(run_wait); -use File::Path (); require PublicInbox::LeiRediff; sub diff_a ($$) { @@ -21,7 +20,6 @@ sub diff_a ($$) { my $rdr = { -C => "$self->{tmp}" }; @$rdr{1, 2} = @$lei{1, 2}; run_wait($cmd, $lei->{env}, $rdr) and $lei->child_error($?); - File::Path::remove_tree($self->{curdir}); } sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh