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 <tigran.mkrtchyan@desy.de>
This commit is contained in:
parent
e02c9ec1bf
commit
f3513f3fe4
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue