Skip to content

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

Merged

Conversation

sungshik
Copy link
Contributor

@sungshik sungshik commented May 2, 2025

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.

@sungshik sungshik mentioned this pull request May 2, 2025
3 tasks
Copy link

codecov bot commented May 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.0%. Comparing base (e21382d) to head (4aba4b8).
Report is 15 commits behind head on improved-macos-support-main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor Author

@sungshik sungshik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments

@sungshik sungshik marked this pull request as ready for review May 2, 2025 09:21
@sungshik sungshik requested a review from DavyLandman May 2, 2025 09:22
Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sungshik sungshik merged commit 3d244ad into improved-macos-support-main May 2, 2025
14 checks passed
@sungshik sungshik deleted the improved-macos-support/file-moves branch May 2, 2025 14:37
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