Allow writing an empty file with the new writeStream
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
9ea6573416
commit
665a6d2055
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