coreapi: support symlinks in unixfile

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera 2019-01-24 19:07:09 +01:00
parent f2f677be61
commit e4020f96bb

View File

@ -159,6 +159,9 @@ func newUnixfsFile(ctx context.Context, dserv ipld.DAGService, nd ipld.Node) (fi
if fsn.IsDir() {
return newUnixfsDir(ctx, dserv, nd)
}
if fsn.Type() == ft.TSymlink {
return files.NewLinkFile(string(fsn.Data()), nil), nil
}
case *dag.RawNode:
default: