# HG changeset patch # User Olaf Wintermann # Date 1651999287 -7200 # Node ID 03c052d9a097496e5a1f3e4352b4a307f44ef5a2 # Parent f4a34b0869c7b543186f6363d03b4cc1a0a3a082 add O_TRUNC to oflags in webdav_put diff -r f4a34b0869c7 -r 03c052d9a097 src/server/webdav/webdav.c --- a/src/server/webdav/webdav.c Sun May 08 10:33:41 2022 +0200 +++ b/src/server/webdav/webdav.c Sun May 08 10:41:27 2022 +0200 @@ -693,7 +693,7 @@ return REQ_ABORTED; } - SYS_FILE fd = vfs_open(vfs, path, O_WRONLY | create_file); + SYS_FILE fd = vfs_open(vfs, path, O_WRONLY | O_TRUNC | create_file); if(!fd) { // if it fails, vfs_open sets http status code return REQ_ABORTED;