mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
fixed tree cleaning
This commit is contained in:
@@ -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('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user