beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

Fix #485: reliance on english system error message #515

Closed dolmen closed 7 years ago

dolmen commented 9 years ago

Fix for #485. Instead of checking the string system error message permission denied (which maybe localized, so the match fails on non-English locales), check $! by comparing it to Errno::EACCES.

hoelzro commented 9 years ago

@dolmen Thanks for this! I like the spirit of this patch, but since the error handler is called from File::Next, there's no guarantee that $! will have the correct error in it when the error handler is called. I have an open issue for that here: https://github.com/petdance/file-next/issues/20

dolmen commented 7 years ago

I've rebased this patch on top of branch dev. Please merge this soon. I'm suffering from this issue for 2.5 years now.

petdance commented 7 years ago

This will go out in 2.17_01.