From e4020f96bbbf65ed24e683b3d420de48664ed2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 24 Jan 2019 19:07:09 +0100 Subject: [PATCH] coreapi: support symlinks in unixfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera --- core/coreapi/unixfile.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/coreapi/unixfile.go b/core/coreapi/unixfile.go index 903c36bac..03973c98c 100644 --- a/core/coreapi/unixfile.go +++ b/core/coreapi/unixfile.go @@ -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: