->{curdir} is localized inside MailDiff->dump_eml anyways, so it
was attempting to remove `undef' :x.  Since most messages don't
have too many attachments, save some opcodes on our end and just
let File::Temp::Dir->DESTROY handle all the cleanup.
---
 lib/PublicInbox/LeiMailDiff.pm | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/PublicInbox/LeiMailDiff.pm b/lib/PublicInbox/LeiMailDiff.pm
index 5e2e4b0b..af6ecf82 100644
--- a/lib/PublicInbox/LeiMailDiff.pm
+++ b/lib/PublicInbox/LeiMailDiff.pm
@@ -7,7 +7,6 @@ package PublicInbox::LeiMailDiff;
 use v5.12;
 use parent qw(PublicInbox::IPC PublicInbox::LeiInput PublicInbox::MailDiff);
 use PublicInbox::Spawn qw(run_wait);
-use File::Path ();
 require PublicInbox::LeiRediff;
 
 sub diff_a ($$) {
@@ -21,7 +20,6 @@ sub diff_a ($$) {
        my $rdr = { -C => "$self->{tmp}" };
        @$rdr{1, 2} = @$lei{1, 2};
        run_wait($cmd, $lei->{env}, $rdr) and $lei->child_error($?);
-       File::Path::remove_tree($self->{curdir});
 }
 
 sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh

Reply via email to