-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: files.cat: detect and handle errors when unknown path and cat dir #1143
Conversation
Tests here: ipfs-inactive/interface-js-ipfs-core#182 |
Will wait on ipfs-inactive/interface-js-ipfs-core#183 (review) to release this fix. |
@@ -137,10 +137,19 @@ module.exports = function files (self) { | |||
pull.collect((err, files) => { | |||
if (err) { d.end(err) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this missing a return?
} | ||
|
||
const content = files[files.length - 1].content | ||
if (files.length > 1) { | ||
files = files.filter((file) => file.path === ipfsPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres's still an issue here, where "tour" dir is being filtered out prematurely because the output path doesn't match the input. Digging in...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... which should be fixed f6c15c6
Should fix #1142