diff --git a/pkg/webdav/webdav.go b/pkg/webdav/webdav.go index b5a1151..c859349 100644 --- a/pkg/webdav/webdav.go +++ b/pkg/webdav/webdav.go @@ -400,6 +400,11 @@ func (h *Handler) handleMkcol(w http.ResponseWriter, r *http.Request, fs *filesy if r.ContentLength > 0 { return http.StatusUnsupportedMediaType, nil } + if strings.Contains(r.UserAgent(), "rclone") { + if _, ok := ctx.Value(fsctx.IgnoreConflictCtx).(bool); !ok { + ctx = context.WithValue(ctx, fsctx.IgnoreConflictCtx, true) + } + } if _, err := fs.CreateDirectory(ctx, reqPath); err != nil { return http.StatusConflict, err }