Sun, 08 May 2022 10:41:27 +0200
add O_TRUNC to oflags in webdav_put
src/server/webdav/webdav.c | file | annotate | diff | comparison | revisions |
--- 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;