summaryrefslogtreecommitdiffstats
path: root/lib/filesystemview.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-28 11:33:59 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-28 11:33:59 +0100
commit3e0bb3e7c4a34b3e7344665b901918ce54b57d81 (patch)
tree53176a0c4efe97aa9fdb464199ffe1a9da1654cd /lib/filesystemview.php
parenta76ff563d645ce456d6366b34fd763d5b11ee0d3 (diff)
downloadnextcloud-server-3e0bb3e7c4a34b3e7344665b901918ce54b57d81.tar.gz
nextcloud-server-3e0bb3e7c4a34b3e7344665b901918ce54b57d81.zip
use temporary file managment
Diffstat (limited to 'lib/filesystemview.php')
-rw-r--r--lib/filesystemview.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index b014c3272f7..5996a5f60fb 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -278,8 +278,9 @@ class OC_FilesystemView {
public function toTmpFile($path){
if(OC_Filesystem::isValidPath($path)){
$source=$this->fopen($path,'r');
- $tmpFile=tempnam(get_temp_dir(),'OC_TMP_').substr($path,strrpos($path,'.'));
if($source){
+ $extention=substr($path,strrpos($path,'.'));
+ $tmpFile=OC_Helper::tmpFile($extention);
return file_put_contents($tmpFile,$source);
}
}