提交 6c854ce8 作者: Matt Bell

unixfs/tar: Ignore /ipfs/ in path

上级 2f2efc84
......@@ -6,6 +6,7 @@ import (
"compress/gzip"
"io"
p "path"
"strings"
mdag "github.com/jbenet/go-ipfs/merkledag"
path "github.com/jbenet/go-ipfs/path"
......@@ -27,6 +28,10 @@ type Reader struct {
}
func NewReader(path string, dag mdag.DAGService, resolver *path.Resolver, compression int) (*Reader, error) {
if strings.HasPrefix(path, "/ipfs/") {
path = path[6:]
}
reader := &Reader{
signalChan: make(chan struct{}),
dag: dag,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论