1
0
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:
Tommi Virtanen
2015-03-13 16:01:14 -07:00
parent 215fed1051
commit fdd1cd8dc0
13 changed files with 87 additions and 102 deletions

View File

@ -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
}