aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2019-07-15 23:51:02 +0200
committerMarcel Klehr <mklehr@gmx.net>2019-07-17 14:58:56 +0200
commitd46744e2f147afa1baafeaae70b744e177c3e5f7 (patch)
treed578d3383df832168c0ea1d58e4e736c75686b2f /lib/private
parentcd3f5e48de0b75ed8558a79d9821966ab81a8ab3 (diff)
downloadnextcloud-server-d46744e2f147afa1baafeaae70b744e177c3e5f7.tar.gz
nextcloud-server-d46744e2f147afa1baafeaae70b744e177c3e5f7.zip
Fix File#putContents(string) on ObjectStorage
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 681e45ad3f2..fbfbcfaa409 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -410,10 +410,10 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
}
public function file_put_contents($path, $data) {
- $stream = fopen('php://temp', 'r+');
- fwrite($stream, $data);
- rewind($stream);
- return $this->writeStream($path, $stream, strlen($data)) > 0;
+ $handle = $this->fopen($path, 'w+');
+ fwrite($handle, $data);
+ fclose($handle);
+ return true;
}
public function writeStream(string $path, $stream, int $size = null): int {