When more than one instance of the FileWatch class (filewatch::FileWatch) is instantiated on MacOS, an unexpected behavior occurs: whenever a file change event is detected, all instances of FileWatch receive notifications for every file change, regardless of whether the change pertains to the specific files they are monitoring.
Steps to Reproduce:
Create multiple instances of filewatch::FileWatch, each monitoring different files or directories.
Make a change to any of the monitored files.
Observe that all instances are triggered, receiving events for files they are not supposed to monitor.
Expected Behavior:
Each FileWatch instance should only receive notifications for the specific files or directories it is monitoring. Events should be localized to the corresponding instance.
Actual Behavior:
All FileWatch instances receive file change notifications.
Environment: MacOS
Description:
Steps to Reproduce:
Expected Behavior: Each FileWatch instance should only receive notifications for the specific files or directories it is monitoring. Events should be localized to the corresponding instance.
Actual Behavior: All FileWatch instances receive file change notifications.