ipfs / ipfs/kubo

`ipfs ls` doesn't behave as expected on symlinks and regular files

Open
#5,502 15 comments 0 reactions 0 assignees View on GitHub
kind/bug topic/ls API
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

I have two type ipfs path `QmRi5n1jzAtqGWQKJbeV4Sv3kGPt3XDfzhWojxiCVpKVdv`(is a symlink) and `QmYuz8WeF7LbwmQB1enoMsEPgFoB2EYaxrEyxGXwceGsmZ` (just a regular file).

```
$ ipfs ls QmRi5n1jzAtqGWQKJbeV4Sv3kGPt3XDfzhWojxiCVpKVdv
$ ipfs ls QmYuz8WeF7LbwmQB1enoMsEPgFoB2EYaxrEyxGXwceGsmZ
```
both of them will print nothing.

But

```
$ ipfs file ls QmRi5n1jzAtqGWQKJbeV4Sv3kGPt3XDfzhWojxiCVpKVdv
Error: cannot list symlinks yet
$ ipfs file ls QmYuz8WeF7LbwmQB1enoMsEPgFoB2EYaxrEyxGXwceGsmZ
QmYuz8WeF7LbwmQB1enoMsEPgFoB2EYaxrEyxGXwceGsmZ
```

The first command will print a error and second one print itself.

I think `ipfs file ls ` is more reasonable than `ipfs ls ` at this point.

WDYT?

@schomatis @Stebalien @magik6k

https://github.com/ipfs/go-ipfs/issues/5497

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.