From a07b5797abbd4a32e065280f3cba0c4edc14a16e Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 27 May 2020 12:16:14 +0200 Subject: [PATCH] defer usage of ref --- internal/http/services/owncloud/ocdav/propfind.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/http/services/owncloud/ocdav/propfind.go b/internal/http/services/owncloud/ocdav/propfind.go index de8525ce6e..c6196f65c9 100644 --- a/internal/http/services/owncloud/ocdav/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind.go @@ -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, } @@ -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" {