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

Return files even if an error occurred #43

Closed
wants to merge 3 commits into from
Closed

Conversation

popod
Copy link

@popod popod commented Oct 6, 2016

Add an option to allow returning files even if a fs.stat error occurs.
#42 #35

@popod
Copy link
Author

popod commented Oct 11, 2016

Does my pull request is ok for you ? would you like to merge it ?

@aymanar
Copy link

aymanar commented Nov 2, 2016

When will this change be released?

@popod
Copy link
Author

popod commented Nov 2, 2016

I use this code since 1 month and it works great..

@popod
Copy link
Author

popod commented Dec 1, 2016

please merge..

@jergason
Copy link
Owner

jergason commented Dec 1, 2016

I have similar concerns with this PR as with #35: ignoring every single error feels wrong to me. If the goal is to continue on broken symbolic links, is there a way to specifically check if the error is for a broken symbolic link, and only continue in that case?

@popod
Copy link
Author

popod commented Dec 1, 2016

I think that the feature we want is that recursive-readdir return files that are "ok" in all case. Then, by setting option forceContinue=true we don't care about the error and the number of files that thrown error.. we just want the liste of files without error. With this PR, you close all your issues and pending PR.

I you want just correct the symlink error, I think you should add a test to know if the current file is a symlink and if the error code is "ENOENT". I could do an other PR later for this if you want..

@popod
Copy link
Author

popod commented Dec 28, 2016

@jergason this feature fit the needs of @kevincaradant and many others ! I think you should merge it in your repo ???

@jergason
Copy link
Owner

jergason commented Feb 5, 2017

@popod I'm happy to revisit this if you handle the objection I specified: continuing on only ENOENT. I'm closing this PR but feel free to open another one handling that case specifically.

@jergason jergason closed this Feb 5, 2017
@popod
Copy link
Author

popod commented Feb 8, 2017

@jergason why only for ENOENT ? In my case I want that recursive-readdir return the path of all files that throw no error of any kind.. By continuing on only ENOENT, this is not what I want..

As I tell you in my last message, I should add another option to handle the ENOENT case. And for that I will open an other PR.

Ok for you ?

@kevincaradant
Copy link

@jergason , Indeed, my issue #46 is typically the case where ENOENT is useless. On some files, I get a EPERM error ! :)
I think @popod propose to you a good idea.

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

Successfully merging this pull request may close these issues.

4 participants