summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-08-07 14:53:31 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-08-07 14:53:31 +0200
commite33fc2807cef5c4e797f244e782c23e78a1d02fe (patch)
tree47804c28690b8414a994c5b5511aac97ab54ef40 /lib
parent6da9c09467f5162a957914bd836cc4b157591e51 (diff)
parentcb842ba793a09b23dcd0415d0322e99bb9650dd3 (diff)
downloadnextcloud-server-e33fc2807cef5c4e797f244e782c23e78a1d02fe.tar.gz
nextcloud-server-e33fc2807cef5c4e797f244e782c23e78a1d02fe.zip
Merge pull request #10142 from owncloud/fix-#9283-gzip_support
Removed broken tar cutter, added tar and fixed extension switch.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/archive.php5
-rw-r--r--lib/private/archive/tar.php10
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/private/archive.php b/lib/private/archive.php
index a62f22cf6d7..562172ddefa 100644
--- a/lib/private/archive.php
+++ b/lib/private/archive.php
@@ -20,11 +20,8 @@ abstract class OC_Archive{
case '.gz':
case '.bz':
case '.bz2':
- if(strpos($path, '.tar.')) {
- return new OC_Archive_TAR($path);
- }
- break;
case '.tgz':
+ case '.tar':
return new OC_Archive_TAR($path);
}
}
diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php
index 21a995d9e50..3f64b4c5064 100644
--- a/lib/private/archive/tar.php
+++ b/lib/private/archive/tar.php
@@ -40,12 +40,14 @@ class OC_Archive_TAR extends OC_Archive{
if(strpos($file, '.')) {
$extension=substr($file, strrpos($file, '.'));
switch($extension) {
- case 'gz':
- case 'tgz':
+ case '.gz':
+ case '.tgz':
return self::GZIP;
- case 'bz':
- case 'bz2':
+ case '.bz':
+ case '.bz2':
return self::BZIP;
+ case '.tar':
+ return self::PLAIN;
default:
return self::PLAIN;
}