From ff7c7326f5a545da6fe51a8ea70baa1d7a48ae03 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 24 Nov 2018 08:06:14 +0800 Subject: [PATCH] need to use "c" for partial updates, as "r+" requires the file to exits --- api/src/WebDAV/Server/Filesystem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/WebDAV/Server/Filesystem.php b/api/src/WebDAV/Server/Filesystem.php index 1fefdd50a0..7a660b6bc4 100644 --- a/api/src/WebDAV/Server/Filesystem.php +++ b/api/src/WebDAV/Server/Filesystem.php @@ -523,8 +523,8 @@ class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server return "403 Forbidden"; } - // for range requests we need to open with "r+" as "w" truncates the file! - $fp = fopen($fspath, empty($options['ranges']) ? "w" : "r+"); + // for range requests we need to open with "c" as "w" truncates the file! + $fp = fopen($fspath, empty($options['ranges']) ? "w" : "c"); return $fp; }