fixed tree cleaning

This commit is contained in:
joey
2000-04-21 02:28:52 +00:00
parent e142f96f77
commit 3a137ecdd4
2 changed files with 4 additions and 2 deletions

View File

@@ -186,12 +186,12 @@ package was unpacked, it is time now to wipe out the temporary directory.
sub DESTROY {
my $this=shift;
return if (defined $this->unpacked_tree || $this->unpacked_tree eq '');
return if (! defined $this->unpacked_tree || $this->unpacked_tree eq '');
# This should never happen, but it pays to check.
if ($this->unpacked_tree eq '/') {
die "alien internal error: unpacked_tree is set to `/'. Please file a bug report!";
}
system 'rm', '-rf', $this->unpacked_tree &&
system ('rm', '-rf', $this->unpacked_tree) &&
die "unable to delete temporary directory `".$this->unpacked_tree."`: $!";
$this->unpacked_tree('');
}