Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Code update after review

Co-Authored-By: rrzaripov <r.r.zaripov@gmail.com>
  • Loading branch information
BoboTiG and rrzaripov committed Apr 23, 2019
1 parent b2990c9 commit 8cfd007
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/watchdog/observers/inotify_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,9 @@ def _recursive_simulate(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():
for _path, _wd in self._wd_for_path.copy().items():
if _path.startswith(move_src_path + os.path.sep.encode()):
moved_wd = self._wd_for_path.pop(_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
Expand Down

0 comments on commit 8cfd007

Please sign in to comment.