aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Installer.php
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-10-21 16:03:40 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-10-22 10:15:46 +0200
commitd11de8c8e7a61bccd09b42cc367a02d104b70bbb (patch)
tree2905602d5859b00ce006fdc13d29a066a4cb3b06 /lib/private/Installer.php
parent38bb40cffa6f0302efa134a347bd876e257495c1 (diff)
downloadnextcloud-server-d11de8c8e7a61bccd09b42cc367a02d104b70bbb.tar.gz
nextcloud-server-d11de8c8e7a61bccd09b42cc367a02d104b70bbb.zip
Add more details if extract fails.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Installer.php')
-rw-r--r--lib/private/Installer.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index 47d6c42d518..9388711697a 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -294,12 +294,14 @@ class Installer {
if ($archive) {
if (!$archive->extract($extractDir)) {
- throw new \Exception(
- sprintf(
- 'Could not extract app %s',
- $appId
- )
- );
+ $errorMessage = 'Could not extract app ' . $appId;
+
+ $archiveError = $archive->getError();
+ if ($archiveError instanceof \PEAR_Error) {
+ $errorMessage .= ': ' . $archiveError->getMessage();
+ }
+
+ throw new \Exception($errorMessage);
}
$allFiles = scandir($extractDir);
$folders = array_diff($allFiles, ['.', '..']);