mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 11:31:54 +08:00
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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user