From eb52efb954c784d7bec1de1cbb2683c3ba028f98 Mon Sep 17 00:00:00 2001 From: Quentin Delfour Date: Tue, 2 Jul 2024 16:13:40 +0200 Subject: [PATCH] Fix to avoid an error when creating several subdirectories with mkdir -p If I make several subfolders in a directory monitored by a watcher, an error is triggered (a tuple (directory, id) is added to the list and crashes the watcher reading --- python3/pyinotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3/pyinotify.py b/python3/pyinotify.py index bc24313..1f59239 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -2064,7 +2064,7 @@ def get_wd(self, path): """ path = self.__format_path(path) for iwd in self._wmd.items(): - if iwd[1].path == path: + if iwd[1] is Watch and iwd[1].path == path: return iwd[0] def get_path(self, wd):