diff --git a/changelog/unreleased/fix-propfind-sharetype.md b/changelog/unreleased/fix-propfind-sharetype.md new file mode 100644 index 0000000000..35f6aa4dd7 --- /dev/null +++ b/changelog/unreleased/fix-propfind-sharetype.md @@ -0,0 +1,5 @@ +Bugfix: Fix the share types in propfinds + +The share types for public links were not correctly added to propfinds. + +https://github.com/cs3org/reva/pull/2316 diff --git a/internal/http/services/owncloud/ocdav/propfind.go b/internal/http/services/owncloud/ocdav/propfind.go index e1c43146b6..f26ccf4dbb 100644 --- a/internal/http/services/owncloud/ocdav/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind.go @@ -159,7 +159,7 @@ func (s *svc) propfindResponse(ctx context.Context, w http.ResponseWriter, r *ht var linkshares map[string]struct{} listResp, err := client.ListPublicShares(ctx, &link.ListPublicSharesRequest{Filters: filters}) if err == nil { - linkshares := make(map[string]struct{}) + linkshares = make(map[string]struct{}, len(listResp.Share)) for i := range listResp.Share { linkshares[listResp.Share[i].ResourceId.OpaqueId] = struct{}{} }