mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 09:52:20 +08:00
Remove fsrepo.At, make Open a constructor function
Nobody calls At without immediately calling Open. First step, a mechanical transformation. Cleanups will follow.
This commit is contained in:
@ -193,8 +193,8 @@ func (i *cmdInvocation) constructNodeFunc(ctx context.Context) func() (*core.Ipf
|
||||
return nil, errors.New("constructing node without a request context")
|
||||
}
|
||||
|
||||
r := fsrepo.At(i.req.Context().ConfigRoot)
|
||||
if err := r.Open(); err != nil { // repo is owned by the node
|
||||
r, err := fsrepo.Open(i.req.Context().ConfigRoot)
|
||||
if err != nil { // repo is owned by the node
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user