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

[MOB-70] Update Folder/Files when renamed on iOS #2225

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Rocky43007
Copy link
Member

@Rocky43007 Rocky43007 commented Mar 20, 2024

If a folder or file has been renamed externally on iOS, the core has no idea how to handle this event, throwing errors and disappearing the folder/file.

Looks like it's due to iOS sending a Create Event with the new Folder instead of sending it as a Rename Event.

For folders being renamed, iOS throws a Create Event with the new path, and then a Modify event with the old path.

So, I needed to add a new function just for folder renames.
Copy link

linear bot commented Mar 20, 2024

Copy link

vercel bot commented Mar 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spacedrive-landing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 3:58pm
spacedrive-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 3:58pm

I had to change how `starts_with` works, but now renames work fine on iOS for both files and folders, no matter how deep they are in a location.
@Rocky43007 Rocky43007 marked this pull request as ready for review March 21, 2024 22:52
@Rocky43007 Rocky43007 requested review from a team as code owners March 21, 2024 22:52
@Rocky43007 Rocky43007 changed the title [MOB-70] Update Folder Names when Renamed on iOS [MOB-70] Update Folder/Files when renamed on iOS Mar 21, 2024
core/src/location/manager/watcher/ios.rs Show resolved Hide resolved
core/src/location/manager/watcher/ios.rs Outdated Show resolved Hide resolved
core/src/location/manager/watcher/ios.rs Outdated Show resolved Hide resolved
@Rocky43007
Copy link
Member Author

Working on a fix to multiple rename events being set at the same time because otherwise, it's broken and crashes.

@utkubakir utkubakir marked this pull request as draft March 22, 2024 19:28
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.

None yet

2 participants