Browse Source

Merge remote-tracking branch 'gh-yarikoptic/master'

* gh-yarikoptic/master:
  BF: pyinotify - use bitwise op on masks and do not try tracking newly created directories
pull/115/head
Yaroslav Halchenko 12 years ago
parent
commit
f8c8a5583e
  1. 6
      server/filterpyinotify.py

6
server/filterpyinotify.py

@ -65,7 +65,11 @@ class FilterPyinotify(FileFilter):
def callback(self, event):
path = event.pathname
if event.mask == pyinotify.IN_CREATE:
if event.mask & pyinotify.IN_CREATE:
# skip directories altogether
if event.mask & pyinotify.IN_ISDIR:
logSys.debug("Ignoring creation of directory %s" % path)
return
# check if that is a file we care about
if not path in self.__watches:
logSys.debug("Ignoring creation of %s we do not monitor" % path)

Loading…
Cancel
Save