Fix a bug where path and new path were switched in inotifyobserver moved event
Signed-off-by: Gora Khargosh <gora.khargosh@gmail.com>
diff --git a/watchdog/inotify_observer.py b/watchdog/inotify_observer.py
index 064b861..0fa17be 100644
--- a/watchdog/inotify_observer.py
+++ b/watchdog/inotify_observer.py
@@ -49,8 +49,8 @@
def process_IN_MOVED_TO(self, event):
# TODO: Moved event on a directory does not fire moved event for
# files inside the directory. Fix?
- path = event.pathname
- new_path = event.src_pathname
+ path = event.src_pathname
+ new_path = event.pathname
if event.dir:
self.event_handler.on_moved(DirMovedEvent(path, new_path=new_path))
else: