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 99E011F542 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=omGtEYWeLk/jnZy67TIp2sbZRPeaaXWQ+9nWL/wEq/E=; h=From:To:Subject:Date:From; b=IHVyM6chJnr3zcO9c6C+ulH1o5jFA6k4kmSejCqOjbIit/ttwQGaKSoG7fUrVNpUO 49iSErZWvcR2y2HaotsP3SaFkVJ3LsN/zmTcrrlKnvCCCTJu5Ql8GU1AimxrKuSeWT mkrGFcT5JZWrIzgsGmviZJ/nflR5M6GnDbkMl+Es= 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:53 +0000 Message-Id: <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;