Skip to content

Commit

Permalink
Revert adding original path to share children
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Aug 4, 2020
1 parent 8f6e295 commit def36fb
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -941,26 +941,8 @@ func (s *svc) Stat(ctx context.Context, req *provider.StatRequest) (*provider.St
Path: target,
},
}

req.Ref = ref
res, err := s.stat(ctx, req)
if err != nil {
return &provider.StatResponse{
Status: status.NewInternal(ctx, err, "gateway: error stating"),
}, nil
}
if res.Status.Code != rpc.Code_CODE_OK {
err := status.NewErrorFromCode(res.Status.Code, "gateway")
log.Err(err).Msg("gateway: error stating")
return &provider.StatResponse{
Status: status.NewInternal(ctx, err, "gateway: error stating"),
}, nil
}

// we need to make sure we don't expose the reference target in the resource
// information.
res.Info.Path = p
return res, nil
return s.stat(ctx, req)
}

panic("gateway: stating an unknown path:" + p)
Expand Down

0 comments on commit def36fb

Please sign in to comment.