summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-12-18 11:25:33 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-12-18 11:25:33 +0100
commita18c0983d5db32e98461404888200118f83011d7 (patch)
tree98bebd6795b86dc39cf1a3b14acb77b872bc2ae6 /lib/private/files
parent90b0831cec88763038e241cc4816db204c045e69 (diff)
downloadnextcloud-server-a18c0983d5db32e98461404888200118f83011d7.tar.gz
nextcloud-server-a18c0983d5db32e98461404888200118f83011d7.zip
Use TempManager instead of tmpFile
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/objectstore/objectstorestorage.php2
-rw-r--r--lib/private/files/storage/localtempfiletrait.php2
-rw-r--r--lib/private/files/type/detection.php2
-rw-r--r--lib/private/files/view.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index a053ea6d6d2..b34a6bdfb84 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -274,7 +274,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
} else {
$ext = '';
}
- $tmpFile = \OC_Helper::tmpFile($ext);
+ $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext);
\OC\Files\Stream\Close::registerCallback($tmpFile, array($this, 'writeBack'));
if ($this->file_exists($path)) {
$source = $this->fopen($path, 'r');
diff --git a/lib/private/files/storage/localtempfiletrait.php b/lib/private/files/storage/localtempfiletrait.php
index 84331f49b19..8875c2c4493 100644
--- a/lib/private/files/storage/localtempfiletrait.php
+++ b/lib/private/files/storage/localtempfiletrait.php
@@ -70,7 +70,7 @@ trait LocalTempFileTrait {
} else {
$extension = '';
}
- $tmpFile = \OC_Helper::tmpFile($extension);
+ $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($extension);
$target = fopen($tmpFile, 'w');
\OC_Helper::streamCopy($source, $target);
fclose($target);
diff --git a/lib/private/files/type/detection.php b/lib/private/files/type/detection.php
index c102e739e04..0e2bab39e5b 100644
--- a/lib/private/files/type/detection.php
+++ b/lib/private/files/type/detection.php
@@ -238,7 +238,7 @@ class Detection implements IMimeTypeDetector {
$finfo = finfo_open(FILEINFO_MIME);
return finfo_buffer($finfo, $data);
} else {
- $tmpFile = \OC_Helper::tmpFile();
+ $tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
$fh = fopen($tmpFile, 'wb');
fwrite($fh, $data, 8024);
fclose($fh);
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index b8b1b8a50d6..fcea4828c49 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -912,7 +912,7 @@ class View {
$source = $this->fopen($path, 'r');
if ($source) {
$extension = pathinfo($path, PATHINFO_EXTENSION);
- $tmpFile = \OC_Helper::tmpFile($extension);
+ $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($extension);
file_put_contents($tmpFile, $source);
return $tmpFile;
} else {