Skip to content

Commit

Permalink
defer usage of ref
Browse files Browse the repository at this point in the history
  • Loading branch information
refs committed May 27, 2020
1 parent 21dbf29 commit a07b579
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/http/services/owncloud/ocdav/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ func (s *svc) handlePropfind(w http.ResponseWriter, r *http.Request, ns string)
for len(stack) > 0 {
// retrieve path on top of stack
nextInfo := stack[len(stack)-1]
ref = &provider.Reference{
Spec: &provider.Reference_Id{
Id: nextInfo.Id,
},
}
req := &provider.ListContainerRequest{
Ref: ref,
}
Expand All @@ -123,6 +118,12 @@ func (s *svc) handlePropfind(w http.ResponseWriter, r *http.Request, ns string)
return
}

ref = &provider.Reference{
Spec: &provider.Reference_Id{
Id: nextInfo.Id,
},
}

infos = append(infos, res.Infos...)

if depth != "infinity" {
Expand Down

0 comments on commit a07b579

Please sign in to comment.