[PR #1293] Switch away from Windows.Storage.ApplicationData #24571

Open
opened 2026-01-31 09:04:05 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/1293

State: closed
Merged: Yes


This commit drops all of the special packaged app code in
CascadiaSettingsSerialization. It can all be replaced with passing
KF_FLAG_FORCE_APP_DATA_REDIRECTION to SHGetKnownFolderPath, which will
automatically handle the different paths used in packaged context.

We'll still store profiles.json under %APPDATA%\Microsoft\Windows
Terminal in an unpackaged context.

I've also taken the liberty of fixing a settings reload crash. Using the
Application storage APIs would cause us to throw an exception when
profiles.json was deleted, which it absolutely was for certain editors
that do an atomic replace.

Because we're not using W.S.A any more, this cuts down our load time
significantly and fixes all of our known STA/MTA-on-startup issues.

Fixes #1102, #1292.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/1293 **State:** closed **Merged:** Yes --- This commit drops all of the special packaged app code in CascadiaSettingsSerialization. It can all be replaced with passing KF_FLAG_FORCE_APP_DATA_REDIRECTION to SHGetKnownFolderPath, which will automatically handle the different paths used in packaged context. We'll still store profiles.json under %APPDATA%\Microsoft\Windows Terminal in an unpackaged context. I've also taken the liberty of fixing a settings reload crash. Using the Application storage APIs would cause us to throw an exception when profiles.json was deleted, which it absolutely was for certain editors that do an atomic replace. Because we're not using W.S.A any more, this cuts down our load time significantly and fixes all of our known STA/MTA-on-startup issues. Fixes #1102, #1292. ## PR Checklist * [x] Closes #1102, #1292 * [x] CLA signed * [x] Tests: manual * [x] I've discussed this with core contributors already.
claunia added the pull-request label 2026-01-31 09:04:05 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24571