Commit b8788052 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Ensure zip archive is reopened before extracting (bug #495230)


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 5a595f72
......@@ -1826,10 +1826,10 @@ class ArtefactTypeArchive extends ArtefactTypeFile {
$tempdir = get_config('dataroot') . 'artefact/file/temp';
check_dir_exists($tempdir);
$this->read_archive();
if ($this->archivetype == 'tar') {
$this->read_archive();
// Untar everything into a temp directory first
$tempsubdir = tempnam($tempdir, '');
unlink($tempsubdir);
......@@ -1857,6 +1857,8 @@ class ArtefactTypeArchive extends ArtefactTypeFile {
} else if ($this->archivetype == 'zip') {
$this->open_archive();
$tempfile = tempnam($tempdir, '');
$i = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment