1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 19:32:24 +08:00

core: add context.Context param to core.Resolve()

commands/object: remove objectData() and objectLinks() helpers
resolver: added context parameters
sharness: $HASH carried the \r from the http protocol with
sharness: write curl output to individual files
http gw: break PUT handler until PR#1191
This commit is contained in:
Henry
2015-05-01 17:33:24 +02:00
parent bf5b8032a8
commit f640ba0089
15 changed files with 134 additions and 128 deletions

View File

@ -56,7 +56,7 @@ func (s *Root) Lookup(ctx context.Context, name string) (fs.Node, error) {
return nil, fuse.ENOENT
}
nd, err := s.Ipfs.Resolver.ResolvePath(path.Path(name))
nd, err := s.Ipfs.Resolver.ResolvePath(ctx, path.Path(name))
if err != nil {
// todo: make this error more versatile.
return nil, fuse.ENOENT
@ -124,7 +124,7 @@ func (s *Node) Attr() fuse.Attr {
// Lookup performs a lookup under this node.
func (s *Node) Lookup(ctx context.Context, name string) (fs.Node, error) {
log.Debugf("Lookup '%s'", name)
nodes, err := s.Ipfs.Resolver.ResolveLinks(s.Nd, []string{name})
nodes, err := s.Ipfs.Resolver.ResolveLinks(ctx, s.Nd, []string{name})
if err != nil {
// todo: make this error more versatile.
return nil, fuse.ENOENT