-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On created event not correctly handled on linux #76
Comments
Ah yes, the issue with inotify is that it generates multiple events for something we want to handle as one event. It would be good to map out exactly which events are triggered for what situations (file creation, file moved to directory, file modified, file deleted, etc). I'm fairly certain the behavior is different across platforms as well. I don't think watchdog is completely platform agnostic... |
I think it's possible to deal with this issue by keeping track of the last event type. |
Keep track of the last event to prevent a created event to be followed by a modified event. Take care of the `on_change` method signature that takes an optional `event` argument. Signed-off-by: Eric Villard <[email protected]>
addressed by #77 |
Better choice I think, please see my comment here: #77 (comment) |
Hi,
the following code taken from the
on_created
event handler:prevents the
on_change
method to be called onon_created
events.This appears more as a semantic issue as the
on_modified
handler seems to do the job for now.But just partially in fact, because this is the source of the issue #68.
And it would take more importance regarding the issue #58 which implies to distinguish event types.
I think being able to propose an alternative soon.
best regards
The text was updated successfully, but these errors were encountered: