Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Nov 13, 2023
1 parent 5890c82 commit d76c1ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,6 @@ func spaceHref(ctx context.Context, baseURI, fullPath string) string {
// prefixing it with the baseURI.
func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provider.ResourceInfo, ns string, usershares, linkshares map[string]struct{}) (*responseXML, error) {
sublog := appctx.GetLogger(ctx).With().Str("ns", ns).Logger()
md.Path = strings.TrimPrefix(md.Path, ns)

baseURI := ctx.Value(ctxKeyBaseURI).(string)

Expand All @@ -543,6 +542,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide
if _, ok := ctx.Value(ctxSpaceID).(string); ok {
ref = spaceHref(ctx, baseURI, md.Path)
} else {
md.Path = strings.TrimPrefix(md.Path, ns)
ref = path.Join(baseURI, md.Path)
}
if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
Expand Down

0 comments on commit d76c1ae

Please sign in to comment.