diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-20 09:49:06 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-20 09:49:06 +0100 |
commit | 719b70108de60fd46bb70fe54a651941e96970a0 (patch) | |
tree | afd7d64ac7b21c88e719de233e993fdd5ced80b6 /apps/dav | |
parent | 10ae7af87f2d152e7b76e1105b051a1e07fbaa27 (diff) | |
download | nextcloud-server-719b70108de60fd46bb70fe54a651941e96970a0.tar.gz nextcloud-server-719b70108de60fd46bb70fe54a651941e96970a0.zip |
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>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 388bcff9206..8aa7d66ba34 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -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 { |