mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
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:
parent
10ae7af87f
commit
719b70108d
1 changed files with 4 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue