From f3513f3fe4dc52143798e60deb4367f2c829029f Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Mon, 7 Dec 2020 17:57:07 +0100 Subject: [PATCH] files: Local#writeStream should use it's own file_put_contents The OC\Files\Storage\Local#writeStream use system provided file_put_contents. However, it overrides file_put_contents, thus expects that the default behaviour can be different. Use Local#file_put_contents in writeStream to benefit from class specific functionality. Signed-off-by: Tigran Mkrtchyan --- lib/private/Files/Storage/Local.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index f0a81f48930..ed80a4718d3 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -556,7 +556,7 @@ class Local extends \OC\Files\Storage\Common { } public function writeStream(string $path, $stream, int $size = null): int { - $result = file_put_contents($this->getSourcePath($path), $stream); + $result = $this->file_put_contents($path, $stream); if ($result === false) { throw new GenericFileException("Failed write steam to $path"); } else {