From 7f7f9ec8cc33d536e89e72fb7905d88921455dce Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 7 Dec 2021 12:28:19 +0100 Subject: [PATCH] fix public share type in propfinds (#2316) --- changelog/unreleased/fix-propfind-sharetype.md | 5 +++++ internal/http/services/owncloud/ocdav/propfind.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-propfind-sharetype.md 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 320049dfe1..eb0e0b197f 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{}{} }