Repository navigation
Move a translocated Lite to Applications before updating (0.0.96) - #289
Conversation
macOS runs a downloaded app that Finder never moved from a read-only copy, so an update failed with "Read-only file system (os error 30)" under AppTranslocation. Lite now copies itself into /Applications (or ~/Applications), lifts the download mark so the copy opens in place, and reopens from there, where the update waits.
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Reviewed the version bump and macOS translocation relocation path. The relocation handles the intended read-only launch scenario, but replacing an existing app can leave no installation if the staged rename fails after the old bundle is removed.
💬 Posted 1 inline comment
- 💡 MEDIUM
src-tauri/src/lib.rs:7993If removing the existing app succeeds but the following rename fails, this deletes the working installation; the error path then removes the staged copy and continues. Preserve the old bundle until the replacement succeeds, for example by renaming it to a backup and restoring it if the staged rename fails.
📋 Skipped 1 file (lock files, generated, images, etc.)
src-tauri/Cargo.lock
| } | ||
| // An older Lite already there is the one this copy replaces. | ||
| let target = folder.join(name); | ||
| let _ = fs::remove_dir_all(&target); |
There was a problem hiding this comment.
💡 MEDIUM: If removing the existing app succeeds but the following rename fails, this deletes the working installation; the error path then removes the staged copy and continues. Preserve the old bundle until the replacement succeeds, for example by renaming it to a backup and restoring it if the staged rename fails.
There was a problem hiding this comment.
Resolved in 5d54c6a: an existing Lite.app is never removed or replaced any more. It is opened instead, and the only cleanup deletes a copy this call just created.
…n the move fails - A Lite already in Applications is opened rather than replaced, so the move never deletes anything it did not create. - ditto copies straight to the target; a failed copy or a quarantine mark that cannot be lifted removes only that new copy. - A failed open reports the error instead of quitting Lite.
|
🎉 Thanks @glenn-jocher — this PR has been merged! Lite now detects macOS App Translocation, moves and relaunches from an Applications folder so users can retry the update outside the read-only location.
|
A new user's update failed with
Update failed: Read-only file system (os error 30) at path "/private/var/folders/…/T/AppTranslocation/…/d/tauri_current_app…".macOS runs a downloaded app that Finder never moved (opened from the disk image or Downloads) from a randomized read-only copy, which no updater can replace. Lite's release is ad-hoc signed, so new users approve it in Gatekeeper first, which is exactly how they end up running it translocated.
When
install_updatefinds its bundle under/AppTranslocation/, it:dittointo/Applications, or~/Applicationswhen that is not writable, staging under a hidden name and replacing an olderLite.appthere;com.apple.quarantinefrom the copy, as Move-to-Applications helpers do, so it opens in place instead of being translocated again;open -nand exits; the relaunched Lite finds the same update waiting.Validation (macOS):
ditto. The copy carries quarantine0083, whichxattr -drremoves, andcodesign --verify --deep --strictpasses on the copy.cargo clippy,cargo fmt --check, andcargo testpass.Not run here: an actual translocated launch through to the relaunch.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Lite 0.0.96 now detects macOS App Translocation during update installation, moves to an Applications folder, and relaunches from there so the update can be retried outside the read-only location.
📊 Key Changes
install_updatechecks whether Lite’s bundle path contains/AppTranslocation/.dittoto/Applications, falling back to~/Applications, and removes the copy’s quarantine attribute.open -nand exits; if it cannot find a usable destination or open the copy, it returns guidance to open Lite from Applications and update again.🎯 Purpose & Impact
📋 Skipped 1 file (lock files, generated, images, etc.)
src-tauri/Cargo.lock