diff options
author | Hendrik Langer <hendrik.langer@gmx.de> | 2011-10-19 23:38:35 +0200 |
---|---|---|
committer | Hendrik Langer <hendrik.langer@gmx.de> | 2011-10-19 23:38:35 +0200 |
commit | 466b41c36bf7093cdde9d2856eb520503f52640c (patch) | |
tree | 6456918f3f142f0ade1370ffb948fa9ffc59a267 /lib/files.php | |
parent | da8d32ae38acdab576a30ca56b30579f427c780d (diff) | |
download | nextcloud-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/files.php')
-rw-r--r-- | lib/files.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/files.php b/lib/files.php index 631726bf9b5..88b559059f0 100644 --- a/lib/files.php +++ b/lib/files.php @@ -91,7 +91,7 @@ class OC_Files { if(is_array($files)){ $zip = new ZipArchive(); - $filename = sys_get_temp_dir()."/ownCloud.zip"; + $filename = get_temp_dir()."/ownCloud.zip"; if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) { exit("cannot open <$filename>\n"); } @@ -108,7 +108,7 @@ class OC_Files { $zip->close(); }elseif(OC_Filesystem::is_dir($dir.'/'.$files)){ $zip = new ZipArchive(); - $filename = sys_get_temp_dir()."/ownCloud.zip"; + $filename = get_temp_dir()."/ownCloud.zip"; if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) { exit("cannot open <$filename>\n"); } @@ -271,7 +271,7 @@ class OC_Files { * @return string guessed mime type */ static function pull($source,$token,$dir,$file){ - $tmpfile=tempnam(sys_get_temp_dir(),'remoteCloudFile'); + $tmpfile=tempnam(get_temp_dir(),'remoteCloudFile'); $fp=fopen($tmpfile,'w+'); $url=$source.="/files/pull.php?token=$token"; $ch=curl_init(); |