delete the spool file when we are done with it

git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@44 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2002-08-06 13:04:51 +00:00
parent 6cf778d598
commit be25aa03e6

View File

@ -102,4 +102,16 @@ sub body_getline {
}
sub DESTROY {
my $self = shift;
# would we save some disk flushing if we unlinked the file before
# closing it?
undef $self->{_body_file} if $self->{_body_file};
if ($self->{_filename} and -e $self->{_filename}) {
unlink $self->{_filename} or $self->log(0, "Could not unlink ", $self->{_filename}, ": $!");
}
}
1;