Permalink
Browse files

Merge pull request #109 from vorwrath/master

Linux - issue with symlinks
  • Loading branch information...
2 parents 5f49aed + 29e15b8 commit b169c14d9b2415025ccde1cbfb1d613565a15fd9 @gorakhargosh committed Jun 2, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/watchdog/observers/inotify.py
@@ -238,6 +238,7 @@ class InotifyConstants(object):
InotifyConstants.IN_CREATE,
InotifyConstants.IN_DELETE,
InotifyConstants.IN_DELETE_SELF,
+ InotifyConstants.IN_DONT_FOLLOW,
])
class InotifyEvent(object):
@@ -627,6 +628,8 @@ def _add_dir_watch(self, path, recursive, mask):
for root, dirnames, _ in os.walk(path):
for dirname in dirnames:
full_path = absolute_path(os.path.join(root, dirname))
+ if os.path.islink(full_path):
+ continue
self._add_watch(full_path, mask)
def _add_watch(self, path, mask):

0 comments on commit b169c14

Please sign in to comment.