Skip to content

Commit

Permalink
Fix corruption of self._wd_for_path
Browse files Browse the repository at this point in the history
  • Loading branch information
rrzaripov committed Mar 26, 2019
1 parent 90476cd commit c7fc0cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/watchdog/observers/inotify_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def _recursive_simulate(src_path):
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):
if _path.startswith(move_src_path + os.path.sep.encode()):
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)
Expand Down

0 comments on commit c7fc0cf

Please sign in to comment.