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.

remotes/origin/fix-10825
Remco Brenninkmeijer 11 years ago
parent d1aaa7a12e
commit cb842ba793
  1. 5
      lib/private/archive.php
  2. 10
      lib/private/archive/tar.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);
}
}

@ -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;
}

Loading…
Cancel
Save