Skip to content

Commit

Permalink
Fix issue gorakhargosh#514
Browse files Browse the repository at this point in the history
  • Loading branch information
rrzaripov committed Jan 25, 2019
1 parent e4297f0 commit 5693dd9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/watchdog/observers/inotify_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@ def _recursive_simulate(src_path):
del self._wd_for_path[move_src_path]
self._wd_for_path[inotify_event.src_path] = moved_wd
self._path_for_wd[moved_wd] = inotify_event.src_path
if self.is_recursive:
for _path, _wd in self._wd_for_path.items():
if _path.startswith(move_src_path):
moved_wd = self._wd_for_path[_path]
del self._wd_for_path[_path]
_move_to_path = _path.replace(move_src_path, inotify_event.src_path)
self._wd_for_path[_move_to_path] = moved_wd
self._path_for_wd[moved_wd] = _move_to_path
src_path = os.path.join(wd_path, name)
inotify_event = InotifyEvent(wd, mask, cookie, name, src_path)

Expand Down

0 comments on commit 5693dd9

Please sign in to comment.