Skip to content
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

Fix renames of files that existed before we started watching on macOS #48

Merged
merged 1 commit into from
Feb 14, 2021

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Feb 14, 2021

T-371 T-609

This fixes renames on macOS so that the delete event for the old name is properly emitted along with the create event for the new name. There was a test for this, but it only covered the case where the original file was created after we started watching. If the file already existed, only the create event for the new name would be emitted.

This removes the checking of our map to see if the file was created previously (obviously wrong 🙈). This does mean, however, that more unnecessary delete events will be emitted in the case of quick events (e.g. create + delete) because macOS coalesces events, but we will just ignore them anyway if they aren't in the graph.

@height
Copy link

height bot commented Feb 14, 2021

This pull request has been linked to 2 tasks:

💡Tip: Add "Close T-371" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants