diff --git a/internal/grpc/services/storageprovider/storageprovider.go b/internal/grpc/services/storageprovider/storageprovider.go index 2c6253198b..ab4e19e2a9 100644 --- a/internal/grpc/services/storageprovider/storageprovider.go +++ b/internal/grpc/services/storageprovider/storageprovider.go @@ -33,6 +33,7 @@ import ( rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + typesv1beta1 "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/errtypes" "github.com/cs3org/reva/pkg/mime" @@ -941,6 +942,10 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer } // Ugly hack to enable search + if req.Opaque == nil { + req.Opaque = &typesv1beta1.Opaque{Map: make(map[string]*typesv1beta1.OpaqueEntry)} + } + if req.Opaque.Map["search"] != nil { s.storage.ListFolder(ctx, newRef, []string{"search", string(req.Opaque.Map["searchString"].GetValue())}) }