1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:23:18 +08:00

Merge pull request #522 from jbenet/path-ignore-ipfs-prefix

path: ignore prefix /ipfs/
This commit is contained in:
Juan Batiz-Benet
2015-01-08 17:06:47 -08:00

View File

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