Summer_More_More_Tea
Summer_More_More_Tea

Reputation: 13356

Pyinotify -- event raised from original path after directory renaming

I use pyinotify to monitor my file system. The problem is when I rename a directory and create file in the renamed directory, the event is raised from original path(referred by event.name). Can't figure out what is wrong? Any problem with the add_watch flag when initializing the watcher? Currently the flag is set as rec=True, auto_add=True.

Thanks and best regards.

Upvotes: 1

Views: 674

Answers (1)

Brian Cain
Brian Cain

Reputation: 14619

You need to add the IN_MOVE_SELF event to your mask.

Source

Upvotes: 1

Related Questions