summaryrefslogtreecommitdiffstats
path: root/lib/filestorage
diff options
context:
space:
mode:
authorHendrik Langer <hendrik.langer@gmx.de>2011-10-19 23:38:35 +0200
committerHendrik Langer <hendrik.langer@gmx.de>2011-10-19 23:38:35 +0200
commit466b41c36bf7093cdde9d2856eb520503f52640c (patch)
tree6456918f3f142f0ade1370ffb948fa9ffc59a267 /lib/filestorage
parentda8d32ae38acdab576a30ca56b30579f427c780d (diff)
downloadnextcloud-server-466b41c36bf7093cdde9d2856eb520503f52640c.tar.gz
nextcloud-server-466b41c36bf7093cdde9d2856eb520503f52640c.zip
Don't use sys_get_temp_dir(), as it reports the wrong path in restricted environments
Diffstat (limited to 'lib/filestorage')
-rw-r--r--lib/filestorage/local.php2
-rw-r--r--lib/filestorage/remote.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 8e0907f8d3b..8db0ffead4e 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -161,7 +161,7 @@ class OC_Filestorage_Local extends OC_Filestorage{
}
public function toTmpFile($path){
- $tmpFolder=sys_get_temp_dir();
+ $tmpFolder=get_temp_dir();
$filename=tempnam($tmpFolder,'OC_TEMP_FILE_'.substr($path,strrpos($path,'.')));
$fileStats = stat($this->datadir.$path);
if(copy($this->datadir.$path,$filename)){
diff --git a/lib/filestorage/remote.php b/lib/filestorage/remote.php
index fb14c4121a2..88bdbca481c 100644
--- a/lib/filestorage/remote.php
+++ b/lib/filestorage/remote.php
@@ -211,7 +211,7 @@ class OC_Filestorage_Remote extends OC_Filestorage{
$parent=dirname($path);
$name=substr($path,strlen($parent)+1);
$file=$this->remote->getFile($parent,$name);
- $file=tempnam(sys_get_temp_dir(),'oc_');
+ $file=tempnam(get_temp_dir(),'oc_');
file_put_contents($file,$data);
if($return=$this->remote->sendTmpFile($file,$parent,$name)){
$this->notifyObservers($path,OC_FILEACTION_WRITE);