Merge pull request #14299 from nextcloud/fix/14298/fix_storages_not_closing_handle

Hanlde writestream not closing source
This commit is contained in:
Morris Jobke 2019-02-20 10:28:21 +01:00 committed by GitHub
commit 4c8cfd224c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {