Commit db8630d9 by rfkelly0

WatchableFile: only send MODIFIED events if the file is writable

parent 9d33de0d
......@@ -259,10 +259,12 @@ class WatchedFile(object):
def flush(self):
self.file.flush()
if "w" in self.mode or "a" in self.mode or "+" in self.mode:
self.fs.notify_watchers(MODIFIED,self.path,True)
def close(self):
self.file.close()
if "w" in self.mode or "a" in self.mode or "+" in self.mode:
self.fs.notify_watchers(MODIFIED,self.path,True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment