Commit 6895fc65 authored by Steven Allen's avatar Steven Allen

return a nice error when listing sharded directories

Unfortunately, fixing this would require breaking the API.

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent dd948589
......@@ -137,6 +137,10 @@ possible, please use 'ipfs ls' instead.
switch t {
case unixfspb.Data_File:
break
case unixfspb.Data_HAMTShard:
// We need a streaming ls API for this.
res.SetError(fmt.Errorf("cannot list large directories yet"), cmdkit.ErrNormal)
return
case unixfspb.Data_Directory:
links := make([]LsLink, len(merkleNode.Links()))
output.Objects[hash].Links = links
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment