summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-28 14:05:11 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-28 14:05:11 +0100
commit8ad3df9b9eb064a787c5b6aaf7d1d08458c1fba8 (patch)
tree911e8ad6a13c8c451e9057540d25d6d22a8dfe83
parent17f83b17b9e9320b69b5cb6403526b807a248bcf (diff)
parenta543d20958592f0d354d1629c7408121eaabd8a7 (diff)
downloadnextcloud-server-8ad3df9b9eb064a787c5b6aaf7d1d08458c1fba8.tar.gz
nextcloud-server-8ad3df9b9eb064a787c5b6aaf7d1d08458c1fba8.zip
Merge pull request #19182 from cweiske/support-bzip2
Fix #19181: Support .bz2 app archives
-rw-r--r--lib/private/archive/tar.php2
-rw-r--r--lib/private/installer.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php
index 6dd6511598d..4448e56850d 100644
--- a/lib/private/archive/tar.php
+++ b/lib/private/archive/tar.php
@@ -48,7 +48,7 @@ class OC_Archive_TAR extends OC_Archive {
* @param string $source
*/
function __construct($source) {
- $types = array(null, 'gz', 'bz');
+ $types = array(null, 'gz', 'bz2');
$this->path = $source;
$this->tar = new Archive_Tar($source, $types[self::getTarType($source)]);
}
diff --git a/lib/private/installer.php b/lib/private/installer.php
index b5ccc02abf3..86968a7c189 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -279,7 +279,7 @@ class OC_Installer{
//detect the archive type
$mime=OC_Helper::getMimeType($path);
- if ($mime !=='application/zip' && $mime !== 'application/x-gzip') {
+ if ($mime !=='application/zip' && $mime !== 'application/x-gzip' && $mime !== 'application/x-bzip2') {
throw new \Exception($l->t("Archives of type %s are not supported", array($mime)));
}