sr_watch crashes when encountering file it can't read #238
Labels
bug
Something isn't working
likely-fixed
likely fix is in the repository, success not confirmed yet.
If a directory is being watched with sr_watch and someone goes in and attempts to create a new file with:
vi somefile
The presence of the unreadable swap file '.somefile.swp'. causes the observer to trigger a creation event, then when sr_post.py attempts to compute a checksum. The following line:
fp = open(path,'rb')
triggers an exception, but since it isn't handled the sr_watch process completely crashes. Here is the resulting error message:
I imagine a reject statement can be included to ignore these types of files, but I am guessing it should perhaps cause an error message and not cause it to crash.
The text was updated successfully, but these errors were encountered: