ThomasMonkman / filewatch

File watcher in c++
MIT License
426 stars 70 forks source link

example with single file on macOS triggers only remove event #41

Open shakfu opened 1 year ago

shakfu commented 1 year ago

Hi,

The example with '.' directory works as expected on macOS (x86_64), however when changed to a in-directory single text file which is opened with a text editor (sublimetext), the only event triggered is Event::removed even though some text to the file and it was saved.

This is inconsistent with the file watcher behavior when the directory is specified and which works as expected.

undici77 commented 2 weeks ago

Hi,

here the fix:

https://github.com/undici77/filewatch/tree/macos-remove-event-only-fix

moreover, if you are interested, I propose another fix too:

https://github.com/undici77/filewatch/tree/macos-multi-instanse-issue

shakfu commented 2 weeks ago

@undici77

Nice!