Skip to content

Commit

Permalink
comment cleanup
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 Jul 5, 2022
1 parent 859654d commit b21ce72
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion internal/http/services/owncloud/ocdav/locks.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ func (s *svc) handleSpacesLock(w http.ResponseWriter, r *http.Request, spaceID s

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

// build storage space reference
ref, err := spacelookup.MakeStorageSpaceReference(spaceID, r.URL.Path)
if err != nil {
return http.StatusBadRequest, fmt.Errorf("invalid space id")
Expand Down
4 changes: 0 additions & 4 deletions internal/http/services/owncloud/ocdav/propfind/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ func (p *Handler) HandleSpacesPropfind(w http.ResponseWriter, r *http.Request, s
var space *provider.StorageSpace
if res.Info.Space == nil {
sublog.Debug().Msg("stat did not include a space, executing an additional lookup request")
// TODO look up space? hm can the isShared check even work when stating a space? hm yeah ... well ... *mindblown*
// fake a space root
space = &provider.StorageSpace{
Id: &provider.StorageSpaceId{OpaqueId: spaceID},
Expand Down Expand Up @@ -672,9 +671,6 @@ func (p *Handler) getSpaceResourceInfos(ctx context.Context, w http.ResponseWrit

metadataKeys, _ := metadataKeys(pf)

// we need to prefix the path with / to make subsequent prefix matches work
// info.Path = filepath.Join("/", spaceRef.Path)

resourceInfos := []*provider.ResourceInfo{}

req := &provider.ListContainerRequest{
Expand Down
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (s *svc) doFilterFiles(w http.ResponseWriter, r *http.Request, ff *reportFi
infos = append(infos, statRes.Info)
}

responsesXML, err := propfind.MultistatusResponse(ctx, &propfind.XML{Prop: ff.Prop}, infos, s.c.PublicURL, namespace /*"",*/, nil)
responsesXML, err := propfind.MultistatusResponse(ctx, &propfind.XML{Prop: ff.Prop}, infos, s.c.PublicURL, namespace, nil)
if err != nil {
log.Error().Err(err).Msg("error formatting propfind")
w.WriteHeader(http.StatusInternalServerError)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ func LookUpStorageSpacesForPathWithChildren(ctx context.Context, client gateway.
// TODO use ListContainerStream to listen for changes
// retrieve a specific storage space
lSSReq := &storageProvider.ListStorageSpacesRequest{
Opaque: &typesv1beta1.Opaque{
Map: map[string]*typesv1beta1.OpaqueEntry{
// TODO encode requested metadata as json
// "metadata": {Decoder: "json", Value: []byte("*")},
}},
// get all fields, including root_info
FieldMask: &fieldmaskpb.FieldMask{Paths: []string{"*"}},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (h *VersionsHandler) doListVersions(w http.ResponseWriter, r *http.Request,
infos = append(infos, vi)
}

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

0 comments on commit b21ce72

Please sign in to comment.