open files for writing in webdav_put webdav

Sun, 01 Nov 2020 09:46:57 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 01 Nov 2020 09:46:57 +0100
branch
webdav
changeset 262
c459019a3ed3
parent 261
f2c772336ecd
child 263
533f9097d712

open files for writing in webdav_put

src/server/webdav/webdav.c file | annotate | diff | comparison | revisions
--- a/src/server/webdav/webdav.c	Sun Nov 01 08:24:21 2020 +0100
+++ b/src/server/webdav/webdav.c	Sun Nov 01 09:46:57 2020 +0100
@@ -640,7 +640,7 @@
         return REQ_ABORTED;
     }
     
-    SYS_FILE fd = vfs_open(vfs, path, O_RDONLY | create_file);
+    SYS_FILE fd = vfs_open(vfs, path, O_WRONLY | create_file);
     if(!fd) {
         // if it fails, vfs_open sets http status code
         return REQ_ABORTED;

mercurial