Merge pull request #6586 from nextcloud/fix/app-install-extract-check
Check whether an app archive can be extracted
This commit is contained in:
commit
90d7e8f6f4
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