Hello,
Thank you for this nice library it's really handy.
I think there could be race condition when using InotifyTrees().
The function build a list to use add_watch() on however as add_watch() do not check if the file or folder exists before adding the watch, it could crash in the process.
I happen to have a huge folder that is being watch but this race condition could happen.
I think there could be 2 possible solutions:
maybe add a check in add_watch() if file/folder exists
add a boolean to ignore missing folder and continue the instantiation when using InotifyTrees().
What do you think about this ?
Hello, Thank you for this nice library it's really handy. I think there could be race condition when using
InotifyTrees()
.The function build a list to use
add_watch()
on however asadd_watch()
do not check if the file or folder exists before adding the watch, it could crash in the process. I happen to have a huge folder that is being watch but this race condition could happen.I think there could be 2 possible solutions:
add_watch()
if file/folder existsInotifyTrees()
. What do you think about this ?