-
Notifications
You must be signed in to change notification settings - Fork 1.2k
IPFS.files.ls returns integer not 'directory'/'file' in type attribute #3330
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
This should return a string in line with the docs - would you like to open a PR that fixes it? |
I don't know the code-base well enough. But I would suggest the following two changes (from my investigation).
My proposal: In https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-core/src/utils.js. Change line 21 to:
My proposal: In https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-core/src/components/files/ls.js: Change line 18 to:
|
@achingbrain I submitted a PR. |
Supersedes #3345 #2939 Fixes #3330 #2948 BREAKING CHANGE: types returned by `ipfs.files.ls` are now strings, in line with the docs but different to previous behaviour Co-authored-by: Geoffrey Cohler <g.cohler@computer.org>
From what I can tell, the documentation and the implementation differ.
Documentation here: https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsfileslspath-options.
What I received was a 1 for directory.
The text was updated successfully, but these errors were encountered: