ac4af582301a4e8a29245dbba767eba31334ddf9
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
eed140c4d9 |
update: a Mac update no longer leaves a second magpie in Spotlight (#3965)
Stage unpacked the new app to /Applications/.magpie-update/app/magpie.app
and Install moved the old one to .magpie-update/old.app. LaunchServices
registers a folder ending in .app in /Applications within seconds, and
Install only deleted the folder, so Spotlight kept listing the gone path
as another magpie.
- Stage ditto's the zip (one top folder, magpie.app, checked against the
real v0.1.2119 zip: no FinderInfo bundle bit, no __MACOSX) into
.magpie-update/unzip and renames magpie.app to .magpie-update/payload
at once, then has lsregister -u forget the unzip path in case it was
seen in that moment. codesign verifies a bundle named payload the same
(checked on the real zip: verify ok, a tampered copy fails).
- Install and InstallAsAdmin move the old app to <stage>/old, and remove
filepath.Dir(staged), which is still .magpie-update (or the cache's
update folder on the admin path); renames stay on one volume.
- ForgetOldStaging runs once from the GUI's updater start, in a
goroutine: lsregister -u on .magpie-update/app/magpie.app and
.magpie-update/old.app beside the app and in ~/Library/Caches/magpie/
update. lsregister is /System/Library/Frameworks/CoreServices.framework/
Frameworks/LaunchServices.framework/Support/lsregister (present on
macOS 27.2); failures are ignored, a 10s cap, marker in magpie's cache.
/Volumes/magpie (an old DMG) is left alone.
Run at this head (base
|