mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 18:13:54 +08:00
Merge pull request #522 from jbenet/path-ignore-ipfs-prefix
path: ignore prefix /ipfs/
This commit is contained in:
@ -26,6 +26,10 @@ func (s *Resolver) ResolvePath(fpath string) (*merkledag.Node, error) {
|
||||
log.Debugf("Resolve: '%s'", fpath)
|
||||
fpath = path.Clean(fpath)
|
||||
|
||||
if strings.HasPrefix(fpath, "/ipfs/") {
|
||||
fpath = fpath[6:]
|
||||
}
|
||||
|
||||
parts := strings.Split(fpath, "/")
|
||||
|
||||
// skip over empty first elem
|
||||
|
Reference in New Issue
Block a user