From dd94858981c736b40e05bb1ac174ab50f256ef6f Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 23 Mar 2018 15:59:21 -0700 Subject: [PATCH] fix error when encountering a sharded directory when expecting a file License: MIT Signed-off-by: Steven Allen --- unixfs/io/pbdagreader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixfs/io/pbdagreader.go b/unixfs/io/pbdagreader.go index 5be60bd8e..ac08fade8 100644 --- a/unixfs/io/pbdagreader.go +++ b/unixfs/io/pbdagreader.go @@ -112,7 +112,7 @@ func (dr *PBDagReader) precalcNextBuf(ctx context.Context) error { } switch pb.GetType() { - case ftpb.Data_Directory: + case ftpb.Data_Directory, ftpb.Data_HAMTShard: // A directory should not exist within a file return ft.ErrInvalidDirLocation case ftpb.Data_File: