mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 07:13:23 -04:00
fix: cleanup objectstore file_put_content
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
9b07b7d9c1
commit
e8c7216d5b
1 changed files with 4 additions and 7 deletions
|
|
@ -462,13 +462,10 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|||
}
|
||||
|
||||
public function file_put_contents($path, $data) {
|
||||
$handle = $this->fopen($path, 'w+');
|
||||
if (!$handle) {
|
||||
return false;
|
||||
}
|
||||
$result = fwrite($handle, $data);
|
||||
fclose($handle);
|
||||
return $result;
|
||||
$fh = fopen('php://temp', 'w+');
|
||||
fwrite($fh, $data);
|
||||
rewind($fh);
|
||||
return $this->writeStream($path, $fh, strlen($data));
|
||||
}
|
||||
|
||||
public function writeStream(string $path, $stream, ?int $size = null): int {
|
||||
|
|
|
|||
Loading…
Reference in a new issue