Skip Menu |

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 7858
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: Nobody in particular
Requestors: julian [...] mehnle.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 5.411
  • 5.411a
  • 5.412
  • 5.413
Fixed in: 5.422



Subject: MIME::Parser::init_parse() partially thwarts the preparations of MIME::Parser::FileUnder::init_parse()
In MIME::Parser::FileUnder::init_parse() there's the following code: ... ### Remove and re-create the per-message output directory: ... (-d $self->output_dir) or mkdir $self->output_dir, 0700 or die "mkdir ".$self->output_dir.": $!\n"; ### Add the per-message output directory to the puregables: $self->purgeable($self->output_dir); ... and in MIME::Parser::init_parse() there's the following code: ... $self->{MP5_Filer}->init_parse(); $self->{MP5_Filer}->purgeable([]); ### just to be safe ... That is, MIME::Parser::init_parse() calls MIME::Parser::FileUnder::init_parse(), which creates a temporary working directory and records it as "purgeable", and then MIME::Parser::init_parse() continues to clear the "purgeable" list. As a result, the temporary working directory mistakenly doesn't get removed.
Subject: Proposed solution
From: julian [...] mehnle.net
[JMEHNLE - Sun Oct 3 17:58:44 2004]: Show quoted text
> and in MIME::Parser::init_parse() there's the following code: > > ... > $self->{MP5_Filer}->init_parse(); > $self->{MP5_Filer}->purgeable([]); ### just to be safe > ...
As a solution, I propose swapping around the above two statements so it reads: ... $self->{MP5_Filer}->purgeable([]); ### just to be safe $self->{MP5_Filer}->init_parse(); ...