Fix filemon fallback watcher to ignore things which aren't files.
This commit is contained in:
parent
fe11a46012
commit
289b856317
|
@ -183,12 +183,15 @@ def fallback_watcher(profile):
|
||||||
for fn in os.listdir(path):
|
for fn in os.listdir(path):
|
||||||
fpath = os.path.join(path, fn)
|
fpath = os.path.join(path, fn)
|
||||||
|
|
||||||
# If the primary watcher is handling this file, then it very
|
# We only want files; no folders etc. Note that if the primary
|
||||||
# well could have disappeared already.
|
# watcher noticed and is handling this file, it very well could
|
||||||
|
# have disappeared already.
|
||||||
try:
|
try:
|
||||||
|
if not os.path.isfile(fpath):
|
||||||
|
continue
|
||||||
modtime = os.path.getmtime(fpath)
|
modtime = os.path.getmtime(fpath)
|
||||||
except WindowsError:
|
except WindowsError:
|
||||||
log.debug("file disappeared: {0}".format(fpath))
|
log.debug("file presumably disappeared: {0}".format(fpath))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Queue file for processing only if its last modification time
|
# Queue file for processing only if its last modification time
|
||||||
|
|
Loading…
Reference in a new issue