summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-02-20 09:49:06 +0100
committerMorris Jobke <hey@morrisjobke.de>2019-02-20 11:52:44 +0100
commit7cc3486229455a58f98b805ba4aa8ed99a6ac26d (patch)
treead532656798a154cfeb455e009a183356a99b0e6 /apps/dav
parent141ea50716f6b531a1654453609a6c661ffd9e40 (diff)
downloadnextcloud-server-7cc3486229455a58f98b805ba4aa8ed99a6ac26d.tar.gz
nextcloud-server-7cc3486229455a58f98b805ba4aa8ed99a6ac26d.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.php4
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 {