aboutsummaryrefslogtreecommitdiffstats
path: root/lib/filestorage
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-28 12:06:34 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-28 12:06:34 +0100
commitd1c3aa3112b363f84d721e9fce299d24833cbe7e (patch)
tree9d094dca94d18ecda1c312a2e8d419dd9935f063 /lib/filestorage
parentde37bafa5c00683984302ca6849719a282835da0 (diff)
downloadnextcloud-server-d1c3aa3112b363f84d721e9fce299d24833cbe7e.tar.gz
nextcloud-server-d1c3aa3112b363f84d721e9fce299d24833cbe7e.zip
add test case for getLocalFile
Diffstat (limited to 'lib/filestorage')
-rw-r--r--lib/filestorage/common.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index 62b12fede09..40a9cff5d06 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -108,7 +108,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
// abstract public function free_space($path);
// abstract public function search($query);
public function getLocalFile($path){
- return $this->toTmpFile();
+ return $this->toTmpFile($path);
}
private function toTmpFile($path){//no longer in the storage api, still usefull here
$source=$this->fopen($path,'r');
@@ -117,7 +117,7 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
}
$extention=substr($path,strrpos($path,'.'));
$tmpFile=OC_Helper::tmpFile($extention);
- $target=fopen($tmpFile);
+ $target=fopen($tmpFile,'w');
$count=OC_Helper::streamCopy($source,$target);
return $tmpFile;
}