summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-05 17:00:04 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-05 17:00:04 +0100
commit665a6d205519786c5e8415ca720c33adfcfc8bcd (patch)
treeab040b24456a704249c4a6befe1e4786fd7b093b
parent9ea65734162191b3222ea9f6e265380ea5175f3a (diff)
downloadnextcloud-server-665a6d205519786c5e8415ca720c33adfcfc8bcd.tar.gz
nextcloud-server-665a6d205519786c5e8415ca720c33adfcfc8bcd.zip
Allow writing an empty file with the new writeStream
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-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 57c072fda47..fc30393bb46 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -167,6 +167,10 @@ class File extends Node implements IFile {
if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) {
$count = $partStorage->writeStream($internalPartPath, $data);
$result = $count > 0;
+ if ($result === false) {
+ $result = feof($data);
+ }
+
} else {
$target = $partStorage->fopen($internalPartPath, 'wb');
if ($target === false) {