Skip to content

Commit

Permalink
always initialize Ref
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 May 25, 2021
1 parent a4e9587 commit 4af4a25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,9 @@ func (s *svc) statOnProvider(ctx context.Context, req *provider.StatRequest, res
return
}
if res == nil {
res = &provider.ResourceInfo{}
res = &provider.ResourceInfo{
Ref: &provider.Reference{},
}
}
*res = *r.Info
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (s *service) ListPublicShares(ctx context.Context, req *link.ListPublicShar
log.Info().Str("publicshareprovider", "list").Msg("list public share")
user, _ := user.ContextGetUser(ctx)

shares, err := s.sm.ListPublicShares(ctx, user, req.Filters, &provider.ResourceInfo{}, req.GetSign())
shares, err := s.sm.ListPublicShares(ctx, user, req.Filters, &provider.ResourceInfo{Ref: &provider.Reference{}}, req.GetSign())
if err != nil {
log.Err(err).Msg("error listing shares")
return &link.ListPublicSharesResponse{
Expand Down

0 comments on commit 4af4a25

Please sign in to comment.