Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Linux - issue with symlinks #109

merged 1 commit into from

3 participants


Under linux with inotify, Watchdog currently sees symlinks to directories as traversable and can report changes on either the link or the original. It should work like rsync and most other utilities, where the normal behaviour is to treat the link as just a symlink file - changes should only be reported on them if something changes about the symlink itself (e.g. it is deleted or changes target) rather than changes to the linked files.


Nice one. +1 from me

@gorakhargosh gorakhargosh merged commit b169c14 into gorakhargosh:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 18, 2012
  1. @vorwrath

    Fix traversal of symlinks

    vorwrath authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/watchdog/observers/
3  src/watchdog/observers/
@@ -238,6 +238,7 @@ class InotifyConstants(object):
+ 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):
Something went wrong with that request. Please try again.