Skip to content

Commit

Permalink
fix propfinds with depth 0
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Jun 7, 2022
1 parent 1e461b7 commit 07b5963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/depth-zero-propfind.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion internal/http/services/owncloud/ocdav/propfind/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07b5963

Please sign in to comment.