septag / dmon

Single header C99 portable library for monitoring filesystem changes. (Windows/Linux/MacOS)
BSD 2-Clause "Simplified" License
235 stars 19 forks source link

MacOS 12 Apple M1 issue #25

Closed uliss closed 11 months ago

uliss commented 1 year ago

File update (echo test >> test_file) and move events are recorgnized as create event.

Only create and remove events are recognized stable, sometimes update event is receiveed.

./dmon_test .

rm 1 && touch 1 && sleep 1 && echo test > 1

uliss commented 1 year ago

seems that events are grouped, so if i change

} else if (ev->event_flags & kFSEventStreamEventFlagItemModified) {

to } if (ev->event_flags & kFSEventStreamEventFlagItemModified) {

everything works fine

septag commented 11 months ago

sorry for a "little bit of delay" in response I fixed it according to your suggestion. Thanks!

adeopura4 commented 10 months ago

Hi - wanted to check if this is working for you? When I change the contents of a file (say a text file) on Apple M1 MacOS (14.1.1) , I see that the event is recognized as a create event.

I do have the latest version of your code as of Dec 1, 2023 and it includes the changes that were proposed in this issue.