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, T_SCC_BODY_TEXT_LINE 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 DB29A1F543 for ; Thu, 8 Jun 2023 18:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1686247494; bh=DRnKfpz2lL9PxW844Sb0VK5gSC1Mkdx5IJp/OXqgalE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xWQIgl5aHl1RiDbgzr2Kwt3KzG/1tvw4PHTtXKtL1cMM23Hgp5VBFPxnvCKYZqu2Y +DBJ2kGRlXYj1k7AyFx9GzGTg3asewlT+KQXSlL7kXhGfyXnmThN0A+lHI9Uk+U298 A/29y6sD/otPBl7X0csYNYigvhzDw4slfFM7NDrM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] xapcmd: rely on File::Temp cleanup for temporary dir Date: Thu, 8 Jun 2023 18:04:54 +0000 Message-Id: <20230608180454.450234-2-e@80x24.org> In-Reply-To: <20230608180454.450234-1-e@80x24.org> References: <20230608180454.450234-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: remove_tree from File::Path 2.09 (from Perl 5.16.3 on CentOS 7.x) doesn't seem to work properly on File::Temp objects. Since File::Temp->newdir sets CLEANUP=>1 by default anyways, we'll just rely on that to perform cleanup instead of doing it ourselves. --- lib/PublicInbox/Xapcmd.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index ff5c0eab..4e055acf 100644 --- a/lib/PublicInbox/Xapcmd.pm +++ b/lib/PublicInbox/Xapcmd.pm @@ -589,7 +589,6 @@ sub cpdb ($$) { # cb_spawn callback # this is probably the best place to do xapian-compact # since $dst isn't readable by HTTP or NNTP clients, yet: compact([ $tmp, $new ], $opt); - remove_tree($tmp) or die "failed to remove $tmp: $!\n"; } 1;