-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix ipfs.ls() for a single file object #3440
Conversation
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
Thanks for submitting this, great catch & the fix looks good. The tests for this part of the API live here: https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/src/ls.js - could you please add a test for this and I'll get a patch release out. |
Thanks for adding the tests, I added a couple more and fixed up the breakage when invoking the api over http. |
This fixes a typo where `ipfs.ls()` returns instead of yielding from a generator. The result is that ipfs.ls() does not work when the path is a file. I think this should fix it, with `ls` returning a generator with a single file result. Co-authored-by: achingbrain <alex@achingbrain.net>
fix: fix ipfs.ls() for a single file object (ipfs#3440)
This fixes a typo where `ipfs.ls()` returns instead of yielding from a generator. The result is that ipfs.ls() does not work when the path is a file. I think this should fix it, with `ls` returning a generator with a single file result. Co-authored-by: achingbrain <alex@achingbrain.net>
This fixes a typo where
ipfs.ls()
returns instead of yielding from a generator.The result is that ipfs.ls() does not work when the path is a file. I think this should fix it, with
ls
returning a generator with a single file result.(Note: I wanted to add a test but could not find where this command is being tested).