From 67b52f378f3a717c553f867cfa65018f1ea756bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=80=E1=B4=8D=E1=B4=9B=E1=B4=8F=E1=B4=80=E1=B4=87?= =?UTF-8?q?=CA=80?= Date: Wed, 25 Feb 2026 06:20:57 +0800 Subject: [PATCH] auto_update: Persist custom icons across app updates on macOS (#49727) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After setting a custom icon on macOS, an `Icon\r` file is generated in the application's root directory to store the custom icon metadata. Currently, the update process uses `rsync -av --delete`, which removes this `Icon\r` file and causes the custom icon to revert to the default blue folder. This PR adds the `--exclude 'Icon?'` parameter to ensure the file is preserved during updates. Closes #26639 , Closes #29900. Since I cannot trigger the auto-update mechanism manually, I mounted the latest Zed disk image and simulated the update by executing the rsync command in the terminal to verify the fix. 图片 Before you mark this PR as ready for review, make sure that you have: - [x] Added a solid test coverage and/or screenshots from doing manual testing - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Fixed an issue where custom macOS app icons would revert to default blue folders after an update. --- crates/auto_update/src/auto_update.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index b506b1b31f7e1840a8a78219c8843687ff85cd2c..53fac7beac2475d06f4a0f886536942308f9976c 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -990,7 +990,7 @@ async fn install_release_macos( }; let output = new_command("rsync") - .args(["-av", "--delete"]) + .args(["-av", "--delete", "--exclude", "Icon?"]) .arg(&mounted_app_path) .arg(&running_app_path) .output()