1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 03:42:21 +08:00

path: ignore prefix /ipfs/

This commit is contained in:
Juan Batiz-Benet
2015-01-08 16:52:23 -08:00
parent b427df39af
commit 670e693a31

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