mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-10 10:47:51 +08:00
feat: make ls only work for directories
Long ago, `ls` was the _object_ (merkledag) level listing tool. That's no longer the case. This is a [breaking change] but I don't think anyone will object. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
parent
245c40b8fd
commit
da44e21b95
@ -160,9 +160,6 @@ func (api *UnixfsAPI) Ls(ctx context.Context, p coreiface.Path, opts ...options.
|
||||
}
|
||||
|
||||
dir, err := uio.NewDirectoryFromNode(ses.dag, dagnode)
|
||||
if err == uio.ErrNotADir {
|
||||
return uses.lsFromLinks(ctx, dagnode.Links(), settings)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user