return path of tmp file like filestorage/common does. Fixes broken folder-/multifile-download.

This commit is contained in:
Arthur Schiwon 2012-03-27 02:24:52 +02:00
parent 24bc639222
commit c92fc9bf65
1 changed files with 5 additions and 4 deletions

View File

@ -23,11 +23,11 @@
class OC_FilesystemView { class OC_FilesystemView {
private $fakeRoot=''; private $fakeRoot='';
public function __construct($root){ public function __construct($root){
$this->fakeRoot=$root; $this->fakeRoot=$root;
} }
public function getAbsolutePath($path){ public function getAbsolutePath($path){
if(!$path){ if(!$path){
$path='/'; $path='/';
@ -141,7 +141,7 @@ class OC_FilesystemView {
while (!feof($handle)) { while (!feof($handle)) {
echo fread($handle, $chunkSize); echo fread($handle, $chunkSize);
@ob_flush(); @ob_flush();
flush(); flush();
} }
return $this->filesize($path); return $this->filesize($path);
} }
@ -282,7 +282,8 @@ class OC_FilesystemView {
if($source){ if($source){
$extention=substr($path,strrpos($path,'.')); $extention=substr($path,strrpos($path,'.'));
$tmpFile=OC_Helper::tmpFile($extention); $tmpFile=OC_Helper::tmpFile($extention);
return file_put_contents($tmpFile,$source); file_put_contents($tmpFile,$source);
return $tmpFile;
} }
} }
} }