Merge pull request #12287 from nextcloud/bug/allow_writing_empty_file
Allow writing an empty file with the new writeStream
This commit is contained in:
commit
6635bd6399
1 changed files with 4 additions and 0 deletions
|
@ -167,6 +167,10 @@ class File extends Node implements IFile {
|
|||
if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) {
|
||||
$count = $partStorage->writeStream($internalPartPath, $data);
|
||||
$result = $count > 0;
|
||||
if ($result === false) {
|
||||
$result = feof($data);
|
||||
}
|
||||
|
||||
} else {
|
||||
$target = $partStorage->fopen($internalPartPath, 'wb');
|
||||
if ($target === false) {
|
||||
|
|
Loading…
Reference in a new issue