X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI%2FBugreport.pm;h=0d7658e574f9ee8369c0bbc07c133e0795512563;hb=ddf68e12d5f2988f0bee4ddd5bec46967056a045;hp=f080986a4389df895ee600e882ff862c6b27e6f8;hpb=0c66c0bcc10e6ae9c6f2de25e3e332b466641c1f;p=debbugs.git diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index f080986..0d7658e 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -318,12 +318,14 @@ sub handle_email_message{ my $output; my $output_fh = globify_scalar(\$output); my $entity; + my $tempdir; if (not blessed $email) { my $parser = MIME::Parser->new(); # Because we are using memory, not tempfiles, there's no need to # clean up here like in Debbugs::MIME - $parser->tmp_to_core(1); - $parser->output_to_core(1); + # this will be cleaned up once it goes out of scope + $tempdir = File::Temp->newdir(); + $parser->output_under($tempdir->dirname()); $entity = $parser->parse_data( $email); } else { $entity = $email