fixed: packages try to restore owner

This commit is contained in:
Graham Knop 2008-04-03 14:53:43 +00:00
parent b6d66e6daf
commit b12e1922f0
2 changed files with 9 additions and 10 deletions

View file

@ -21,6 +21,7 @@
- improved behavior of CS mail message filtering
- fixed: Thingy: "cancel" -- cannot cancel when adding a thing
- fixed: unable to respond to poll multiple times in same session
- fixed: packages try to restore owner
7.5.8
- moved Gallery utility methods to WebGUI::Utility::Gallery

View file

@ -975,14 +975,7 @@ sub tar {
chdir $self->getPath or croak 'Unable to chdir to ' . $self->getPath . ": $!";
my @files = ();
find(sub { push(@files, $File::Find::name)}, ".");
if ($Archive::Tar::VERSION eq '0.072') {
my $tar = Archive::Tar->new();
$tar->add_files(@files);
$tar->write($temp->getPath($filename),1);
}
else {
Archive::Tar->create_archive($temp->getPath($filename),1,@files);
}
Archive::Tar->create_archive($temp->getPath($filename),1,@files);
chdir $originalDir;
return $temp;
}
@ -1010,10 +1003,15 @@ sub untar {
my $originalDir = cwd;
chdir $temp->getPath;
local $Archive::Tar::CHOWN = 0;
Archive::Tar->extract_archive($self->getPath($filename),1);
$self->_addError(Archive::Tar->error) if (Archive::Tar->error);
my @files;
find(sub {
push(@files, $File::Find::name);
}, ".");
$self->_changeOwner(@files);
chdir $originalDir;
return $temp;
}