diff --git a/changelog/unreleased/depth-zero-propfind.md b/changelog/unreleased/depth-zero-propfind.md new file mode 100644 index 0000000000..c600e4ae47 --- /dev/null +++ b/changelog/unreleased/depth-zero-propfind.md @@ -0,0 +1,6 @@ +Bugfix: Fix propfinds with depth 0 + +Fixed the response for propfinds with depth 0. The response now doesn't contain the shares jail anymore. + +https://github.com/owncloud/ocis/issues/3704 +https://github.com/cs3org/reva/pull/2918 diff --git a/internal/http/services/owncloud/ocdav/propfind/propfind.go b/internal/http/services/owncloud/ocdav/propfind/propfind.go index 39d7dc48cd..796a365184 100644 --- a/internal/http/services/owncloud/ocdav/propfind/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind/propfind.go @@ -463,7 +463,8 @@ func (p *Handler) getResourceInfos(ctx context.Context, w http.ResponseWriter, r resourceInfos := []*provider.ResourceInfo{ rootInfo, // PROPFIND always includes the root resource } - if rootInfo.Type == provider.ResourceType_RESOURCE_TYPE_FILE { + + if rootInfo.Type == provider.ResourceType_RESOURCE_TYPE_FILE || depth == net.DepthZero { // If the resource is a file then it can't have any children so we can // stop here. return resourceInfos, true, true