Currently, if there's an unreadable file in a directory, watching that directory will fail. This patch fixes that by treating unreadable files as nonexistent.
Don't crash on unreadable files.
Looks good, could you also provide some specs please? Thanks a lot!
@Maher4Ever how does it sounds to you?
First off, thank you for the patch.
In Listen we only check the content of a file when creating the checksum, so that's the only place we need to stop doing it when a file is unreadable. We still could watch changes to unreadable files using the mtime, but of course multiple changes within the same second won't be caught.
Fix #32 - Listen crash with unreadable files
@nex3 Could you please check if the new changes fix your issue?
This doesn't solve it. The issue wasn't reading the file to check for changes, it was the call to File.mtime. This fails if the file is unreadable.
@nex3 On what system did you have that problem? And could you mention the specific case where reading the mtime of a file fails?