diff options
author | Remco Brenninkmeijer <requist1@starmail.nl> | 2014-08-04 14:10:09 +0200 |
---|---|---|
committer | Remco Brenninkmeijer <requist1@starmail.nl> | 2014-08-04 14:10:09 +0200 |
commit | cb842ba793a09b23dcd0415d0322e99bb9650dd3 (patch) | |
tree | aceef634b7aa9dbf869da11aa952bed2daed1803 /lib/private/archive | |
parent | d1aaa7a12e6073b41f4702b2cc50921708e8ab6c (diff) | |
download | nextcloud-server-cb842ba793a09b23dcd0415d0322e99bb9650dd3.tar.gz nextcloud-server-cb842ba793a09b23dcd0415d0322e99bb9650dd3.zip |
Previous commit was not based on master, retry. Removed broken tar cutter, double extensions are not possible in temp files. Added tar support. Fixed extension switch.
Diffstat (limited to 'lib/private/archive')
-rw-r--r-- | lib/private/archive/tar.php | 10 |
1 files changed, 6 insertions, 4 deletions
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; } |