fix error when encountering a sharded directory when expecting a file
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Mar 23, 2018 at 15:59 UTC
dd94858981c736b40e05bb1ac174ab50f256ef6f
1 file changed
+1
-1
unixfs/io/pbdagreader.go
+1
-1
@@ -112,7 +112,7 @@ func (dr *PBDagReader) precalcNextBuf(ctx context.Context) error {
112
}
113
114
switch pb.GetType() {
115
- case ftpb.Data_Directory:
115
+ case ftpb.Data_Directory, ftpb.Data_HAMTShard:
116
// A directory should not exist within a file
117
return ft.ErrInvalidDirLocation
118
case ftpb.Data_File: