From: Eric Wong Date: Thu, 8 Jun 2023 18:04:54 +0000 (+0000) Subject: xapcmd: rely on File::Temp cleanup for temporary dir X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc1162cf86828190805033ac74e45dd8eea73c33;p=thirdparty%2Fpublic-inbox.git xapcmd: rely on File::Temp cleanup for temporary dir 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. --- diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index ff5c0eab5..4e055acf9 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;