-
Notifications
You must be signed in to change notification settings - Fork 296
Conversation
Also fixed ipfs-inactive#408 whilst in the area - `util.addFromFs` goes up almost to the root directory for files. It looks like for directories it was fixed in 42ccb00, but it is now fixed for files too.
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.
LGTM, thank you @JeffDownie :)
@@ -150,10 +150,10 @@ Complete documentation for these methods is coming with: https://github.com/ipfs | |||
|
|||
> `ipfs.util.addFromFs(path, option, callback)` | |||
|
|||
Reads a file from `path` on the filesystem and adds it to IPFS. If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories. | |||
Reads a file from `path` on the filesystem and adds it to IPFS. If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories. To exclude fileglobs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`. |
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.
nice 👍
@JeffDownie CI fails on linting, could you run |
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.
@JeffDownie CI fails on linting, could you run npm run lint locally and fix the errors?
@diasdavid Whoops! I got snowed under by the warnings returned from the linter for other files I hadn't touched and just kind of missed it, assumed it wasn't really adhered to! Should be good to go now though. |
We let warnings pass, they are just remarks, but errors make CI fail. Thank you :) |
Also fixed #408 whilst in the area -
util.addFromFs
goes up almost to the root directory for files. It looks like for directories it was fixed in 42ccb00, but it is now fixed for files too.It looks like when the tests for this were written, someone expected addFromFs to go all the way up to the root dir in '.fsAdd a file' test/ipfs-api/util.spec.js- this seems like bizzare behaviour to expect, so I changed it.