jergason/recursive-readdir

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

OlafRadicke opened this issue · 5 comments

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 commented

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.

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

@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

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

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