@cryptotaxi247 / kubo / commits / 6895fc653

return a nice error when listing sharded directories

Unfortunately, fixing this would require breaking the API. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Mar 23, 2018 at 16:03 UTC 6895fc653fb5f74efd2e7b846213aa122638d0fc
1 file changed +4
core/commands/unixfs/ls.go
+4
@@ -137,6 +137,10 @@ possible, please use 'ipfs ls' instead.
137 switch t {
138 case unixfspb.Data_File:
139 break
140 + case unixfspb.Data_HAMTShard:
141 + // We need a streaming ls API for this.
142 + res.SetError(fmt.Errorf("cannot list large directories yet"), cmdkit.ErrNormal)
143 + return
144 case unixfspb.Data_Directory:
145 links := make([]LsLink, len(merkleNode.Links()))
146 output.Objects[hash].Links = links