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

Error: ENOENT: no such file or directory, stat '/home/oradicke/.kde/cache-subtux' #42

Open
OlafRadicke opened this issue Aug 26, 2016 · 5 comments

Comments

@OlafRadicke
Copy link

Hi jeragason,

nice packet! But I think there is an issue with broken symbolic link.

Error: ENOENT: no such file or directory, stat '/home/oradicke/.kde/cache-subtux'

[oradicke@altona aguano]$ file /home/oradicke/.kde/cache-subtux 
/home/oradicke/.kde/cache-subtux: broken symbolic link to /var/tmp/kdecache-or

What can I do for ignoring broken symbolic links?

Best regards

Olaf

@popod
Copy link

popod commented Dec 28, 2016

using my fork: popod/recursive-readdir#patch-2 will resolve this issue..

just remove this package and add mine

npm remove recursive-readdir
npm install popod/recursive-readdir#patch-2

so you should have this in your package.json

"dependencies": {
    ...
    "recursive-readdir": "github:popod/recursive-readdir#patch-2",
    ...
  }

then you could use the {forceContinue: true} in the option object field.

lonelyelk added a commit to lonelyelk/recursive-readdir that referenced this issue Apr 3, 2017
Problem:
When traversing a directory containig broken symbolic links, said links
throw error before we have a chance to ignore them, which we might want
to.

Solution:
When encountering error code `ENOENT` make `lstat` call which doesn't
fail on broken links due to not following them. It is up to the user
then to check if he needs to ignore this particular link via ignore
function or pattern.

Fixes jergason#42
@lonelyelk
Copy link

@jergason do you have any opinion on the fix? I tried to leave almost everything as is. The only difference is that in a case of ENOENT on stat ignore matchers are called with lstat before throwing the ENOENT above. This is done because you only get your paths from listings and ENOENT is a very particular case. There is an off chance where lstat would throw an error too, but not on the bad link. Given the source of your paths it is hard for me to imagine the case except giving a nonexistent path to begin with.

@popod
Copy link

popod commented Apr 6, 2017

@lonelyelk I've try to push my PR, but jergason don't allow.. see #43. The only option is to use my PR which I and some people use since about 4 month without problems..

capture d ecran 2017-04-06 a 15 24 32

@lonelyelk
Copy link

@popod yeah, I've seen that. Since it is rejected due to it changing API in a way that maintainer doesn't like, I suggested another fix that does not change API.

@popod
Copy link

popod commented Apr 6, 2017

@lonelyelk this is not a problem about broken changes in the API: my PR don't break anything ! If you have something to suggest, I'm open (but I think the right place to talk about this is in #43)

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

3 participants