Skip to content

Commit

Permalink
path: ignore prefix /ipfs/
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet committed Jan 9, 2015
1 parent b427df3 commit 670e693
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions path/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 670e693

Please sign in to comment.