-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle delayed delete / creation notifications
Update the file-state tracking to support the case where we receive a DELETE event but we observe the file as already re-created (event.Info is not nil and hashes are likely populated). Before this change, we would report a deletion but at the same store the hashes and file info. Then, a following CREATION event would be ignored because the diff-ing loggic doesn't take the previous action into account (in this case prev.action==Deleted). The best is to ignore the deletion and report on the observed file changes (if any). Otherwise we have to deal with complex logic in the cases where the OS event includes multiple actions ( ...|DELETED|...).
- Loading branch information
Showing
2 changed files
with
243 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters