Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle permission errors #33

Open
GhyslainBruno opened this issue Jul 21, 2017 · 1 comment
Open

Handle permission errors #33

GhyslainBruno opened this issue Jul 21, 2017 · 1 comment

Comments

@GhyslainBruno
Copy link

Hi guys,

First of all thank you for your job, I currently am using your library and it's pretty powerfull.

I'm just wondering if there would be a way to handle permission errors with it ? (would be awesome)

Thanks for your reply,

Cheers !

@mihnea-dobrescubalaur-hs

Hi!
Glad it's useful!
The code currently skips files without permission (https://github.com/mihneadb/node-directory-tree/blob/master/lib/directory-tree.js#L15). One option would be to add a callback like onError and leave the user to deal with that error. However, I'm wondering - how would you handle a permissions error?

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

No branches or pull requests

2 participants