Skip to content

Commit

Permalink
fix propfind root resource path
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Jun 30, 2022
1 parent 22fa8fe commit 6d6beee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/http/services/owncloud/ocdav/propfind/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (p *Handler) HandleSpacesPropfind(w http.ResponseWriter, r *http.Request, s
res, err := client.Stat(ctx, &provider.StatRequest{
Ref: &ref,
ArbitraryMetadataKeys: metadataKeys,
FieldMask: &fieldmaskpb.FieldMask{Paths: []string{"*"}}, // TODO use more sophisticated filter
FieldMask: &fieldmaskpb.FieldMask{Paths: []string{"*"}}, // TODO use more sophisticated filter? we don't need all space properties, afaict only the spacetype
})
if err != nil {
sublog.Error().Err(err).Msg("error getting grpc client")
Expand Down Expand Up @@ -327,6 +327,8 @@ func (p *Handler) HandleSpacesPropfind(w http.ResponseWriter, r *http.Request, s
}
}

res.Info.Path = r.URL.Path

resourceInfos := []*provider.ResourceInfo{
res.Info,
}
Expand Down

0 comments on commit 6d6beee

Please sign in to comment.