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;

Reply via email to