mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 07:28:20 +08:00
Merge pull request #2577 from pfista/2527-local-resolve
ipfs name resolve --local fixed multihash error
This commit is contained in:
@ -2,6 +2,7 @@ package namesys
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
lru "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/hashicorp/golang-lru"
|
||||
@ -122,6 +123,7 @@ func (r *routingResolver) resolveOnce(ctx context.Context, name string) (path.Pa
|
||||
return cached, nil
|
||||
}
|
||||
|
||||
name = strings.TrimPrefix(name, "/ipns/")
|
||||
hash, err := mh.FromB58String(name)
|
||||
if err != nil {
|
||||
// name should be a multihash. if it isn't, error out here.
|
||||
|
Reference in New Issue
Block a user