Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Adding ignore globs to fsadd. #502

Merged
merged 2 commits into from
Jan 10, 2017

Conversation

JeffDownie
Copy link
Contributor

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.

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.
Copy link
Contributor

@daviddias daviddias left a 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'] }`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

@daviddias
Copy link
Contributor

@JeffDownie CI fails on linting, could you run npm run lint locally and fix the errors?

@daviddias daviddias self-requested a review January 10, 2017 12:58
Copy link
Contributor

@daviddias daviddias left a 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?

@JeffDownie
Copy link
Contributor Author

@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.

@daviddias daviddias merged commit bcec644 into ipfs-inactive:master Jan 10, 2017
@daviddias
Copy link
Contributor

We let warnings pass, they are just remarks, but errors make CI fail.

Thank you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[windows] util.addFromFs goes up almost to the root directory
2 participants