path: ignore prefix /ipfs/
Juan Batiz-Benet committed
Jan 8, 2015 at 16:52 UTC
670e693a311cc9daca35cf0815140a8d9006b18a
1 file changed
+4
path/path.go
+4
@@ -26,6 +26,10 @@ func (s *Resolver) ResolvePath(fpath string) (*merkledag.Node, error) {
26
log.Debugf("Resolve: '%s'", fpath)
27
fpath = path.Clean(fpath)
28
29
+ if strings.HasPrefix(fpath, "/ipfs/") {
30
+ fpath = fpath[6:]
31
+ }
32
+
33
parts := strings.Split(fpath, "/")
34
35
// skip over empty first elem