fix checkstyle on archive zip/tar
This commit is contained in:
parent
00b34a09ea
commit
b5f11195af
|
@ -127,7 +127,10 @@ class OC_Archive_TAR extends OC_Archive{
|
|||
$this->cachedHeaders = $this->tar->listContent();
|
||||
}
|
||||
foreach($this->cachedHeaders as $header) {
|
||||
if($file==$header['filename'] or $file.'/'==$header['filename'] or '/'.$file.'/'==$header['filename'] or '/'.$file==$header['filename']) {
|
||||
if( $file == $header['filename']
|
||||
or $file.'/' == $header['filename']
|
||||
or '/'.$file.'/' == $header['filename']
|
||||
or '/'.$file == $header['filename']) {
|
||||
return $header;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,10 @@ class OC_Archive_ZIP extends OC_Archive{
|
|||
function getStream($path,$mode) {
|
||||
if($mode=='r' or $mode=='rb') {
|
||||
return $this->zip->getStream($path);
|
||||
}else{//since we cant directly get a writable stream, make a temp copy of the file and put it back in the archive when the stream is closed
|
||||
} else {
|
||||
//since we cant directly get a writable stream,
|
||||
//make a temp copy of the file and put it back
|
||||
//in the archive when the stream is closed
|
||||
if(strrpos($path, '.')!==false) {
|
||||
$ext=substr($path, strrpos($path, '.'));
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue