aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Archive
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/Archive
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/Archive')
-rw-r--r--lib/private/Archive/TAR.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index 0d4103299ce..bf69df0edc6 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -381,4 +381,14 @@ class TAR extends Archive {
$types = [null, 'gz', 'bz'];
$this->tar = new \Archive_Tar($this->path, $types[self::getTarType($this->path)]);
}
+
+ /**
+ * Get error object from archive_tar.
+ */
+ public function getError(): ?\PEAR_Error {
+ if ($this->tar instanceof \Archive_Tar && $this->tar->error_object instanceof \PEAR_Error) {
+ return $this->tar->error_object;
+ }
+ return null;
+ }
}