-
Notifications
You must be signed in to change notification settings - Fork 0
Improved macOS support: Support for moving/renaming files #44
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
Improved macOS support: Support for moving/renaming files #44
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## improved-macos-support-main #44 +/- ##
==============================================================
- Coverage 79.1% 0 -79.2%
==============================================================
Files 23 0 -23
Lines 822 0 -822
Branches 95 0 -95
==============================================================
- Hits 651 0 -651
+ Misses 108 0 -108
+ Partials 63 0 -63 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments
…-support/file-moves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds support for moving files.
Due to the limited information that macOS associates with each rename event (only the path/inode), it's a challenge to figure out if a rename event pertains to the source or the target of the move. There are at least two alternative designs: (a) maintain an internal index of the file tree; (b) check if a path exists when a rename event comes in. Alternative (a) is potentially more accurate, but getting the concurrency right requires special care and can get quite non-trivial. This PR implements alternative (b) because it's relatively simple. The feature PR (#39) contains a separate task to consider alternative (a).
Note: This PR ignores the issue of generating events for content items when directories are moved (#45). We need to come up with a general design/approach to deal with those, and then we can revisit the macOS-specific implementation as well.