Hanlde writestream not closing source

Fixes #14298

If a storage doesn'tclose the write stream then $isEOF is not yet set.
So we have to fallback.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-02-20 09:49:06 +01:00
parent 10ae7af87f
commit 719b70108d
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 0 deletions

View File

@ -181,8 +181,12 @@ class File extends Node implements IFile {
$count = $partStorage->writeStream($internalPartPath, $wrappedData);
$result = $count > 0;
if ($result === false) {
$result = $isEOF;
if (is_resource($wrappedData)) {
$result = feof($wrappedData);
}
}
} else {