Check whether an app archive can be extracted
If extraction fails we should not continue the installation/update process as the info.xml cannot be loaded and an unrelated error occurs. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
e43400eddb
commit
2e19c42bc5
1 changed files with 8 additions and 1 deletions
|
@ -288,7 +288,14 @@ class Installer {
|
|||
$archive = new TAR($tempFile);
|
||||
|
||||
if($archive) {
|
||||
$archive->extract($extractDir);
|
||||
if (!$archive->extract($extractDir)) {
|
||||
throw new \Exception(
|
||||
sprintf(
|
||||
'Could not extract app %s',
|
||||
$appId
|
||||
)
|
||||
);
|
||||
}
|
||||
$allFiles = scandir($extractDir);
|
||||
$folders = array_diff($allFiles, ['.', '..']);
|
||||
$folders = array_values($folders);
|
||||
|
|
Loading…
Reference in a new issue