coreapi: support symlinks in unixfile
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Jan 24, 2019 at 19:07 UTC
e4020f96bbbf65ed24e683b3d420de48664ed2cc
1 file changed
+3
core/coreapi/unixfile.go
+3
@@ -159,6 +159,9 @@ func newUnixfsFile(ctx context.Context, dserv ipld.DAGService, nd ipld.Node) (fi
159
if fsn.IsDir() {
160
return newUnixfsDir(ctx, dserv, nd)
161
}
162
+ if fsn.Type() == ft.TSymlink {
163
+ return files.NewLinkFile(string(fsn.Data()), nil), nil
164
+ }
165
166
case *dag.RawNode:
167
default: