* [PATCH] xapcmd: rely on File::Temp cleanup for temporary dir
@ 2023-06-08 18:04 Eric Wong
2023-06-08 18:04 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2023-06-08 18:04 UTC (permalink / raw)
To: meta
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] xapcmd: rely on File::Temp cleanup for temporary dir
2023-06-08 18:04 [PATCH] xapcmd: rely on File::Temp cleanup for temporary dir Eric Wong
@ 2023-06-08 18:04 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2023-06-08 18:04 UTC (permalink / raw)
To: meta
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-08 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 18:04 [PATCH] xapcmd: rely on File::Temp cleanup for temporary dir Eric Wong
2023-06-08 18:04 ` Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).