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
commit 3bc976c49e

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