Skip to content

Commit b21ce72

Browse files
committed
comment cleanup
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
1 parent 859654d commit b21ce72

File tree

5 files changed

+2
-12
lines changed

5 files changed

+2
-12
lines changed

internal/http/services/owncloud/ocdav/locks.go

-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ func (s *svc) handleSpacesLock(w http.ResponseWriter, r *http.Request, spaceID s
400400

401401
span.SetAttributes(attribute.String("component", "ocdav"))
402402

403-
// build storage space reference
404403
ref, err := spacelookup.MakeStorageSpaceReference(spaceID, r.URL.Path)
405404
if err != nil {
406405
return http.StatusBadRequest, fmt.Errorf("invalid space id")

internal/http/services/owncloud/ocdav/propfind/propfind.go

-4
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ func (p *Handler) HandleSpacesPropfind(w http.ResponseWriter, r *http.Request, s
310310
var space *provider.StorageSpace
311311
if res.Info.Space == nil {
312312
sublog.Debug().Msg("stat did not include a space, executing an additional lookup request")
313-
// TODO look up space? hm can the isShared check even work when stating a space? hm yeah ... well ... *mindblown*
314313
// fake a space root
315314
space = &provider.StorageSpace{
316315
Id: &provider.StorageSpaceId{OpaqueId: spaceID},
@@ -672,9 +671,6 @@ func (p *Handler) getSpaceResourceInfos(ctx context.Context, w http.ResponseWrit
672671

673672
metadataKeys, _ := metadataKeys(pf)
674673

675-
// we need to prefix the path with / to make subsequent prefix matches work
676-
// info.Path = filepath.Join("/", spaceRef.Path)
677-
678674
resourceInfos := []*provider.ResourceInfo{}
679675

680676
req := &provider.ListContainerRequest{

internal/http/services/owncloud/ocdav/report.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (s *svc) doFilterFiles(w http.ResponseWriter, r *http.Request, ff *reportFi
110110
infos = append(infos, statRes.Info)
111111
}
112112

113-
responsesXML, err := propfind.MultistatusResponse(ctx, &propfind.XML{Prop: ff.Prop}, infos, s.c.PublicURL, namespace /*"",*/, nil)
113+
responsesXML, err := propfind.MultistatusResponse(ctx, &propfind.XML{Prop: ff.Prop}, infos, s.c.PublicURL, namespace, nil)
114114
if err != nil {
115115
log.Error().Err(err).Msg("error formatting propfind")
116116
w.WriteHeader(http.StatusInternalServerError)

internal/http/services/owncloud/ocdav/spacelookup/spacelookup.go

-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ func LookUpStorageSpacesForPathWithChildren(ctx context.Context, client gateway.
9999
// TODO use ListContainerStream to listen for changes
100100
// retrieve a specific storage space
101101
lSSReq := &storageProvider.ListStorageSpacesRequest{
102-
Opaque: &typesv1beta1.Opaque{
103-
Map: map[string]*typesv1beta1.OpaqueEntry{
104-
// TODO encode requested metadata as json
105-
// "metadata": {Decoder: "json", Value: []byte("*")},
106-
}},
107102
// get all fields, including root_info
108103
FieldMask: &fieldmaskpb.FieldMask{Paths: []string{"*"}},
109104
}

internal/http/services/owncloud/ocdav/versions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func (h *VersionsHandler) doListVersions(w http.ResponseWriter, r *http.Request,
189189
infos = append(infos, vi)
190190
}
191191

192-
propRes, err := propfind.MultistatusResponse(ctx, &pf, infos, s.c.PublicURL, "" /*"",*/, nil)
192+
propRes, err := propfind.MultistatusResponse(ctx, &pf, infos, s.c.PublicURL, "", nil)
193193
if err != nil {
194194
sublog.Error().Err(err).Msg("error formatting propfind")
195195
w.WriteHeader(http.StatusInternalServerError)

0 commit comments

Comments
 (0)