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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1293
Author: @DHowett-MSFT
Created: 6/17/2019
Status: Merged
Merged: 6/18/2019
Merged by: @DHowett-MSFT

Base: masterHead: dev/duhowett/nomoreappdata


📝 Commits (1)

  • 67ecb4a Switch away from Windows.Storage.ApplicationData

📊 Changes

4 files changed (+45 additions, -156 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.cpp (+7 -13)
📝 src/cascadia/TerminalApp/CascadiaSettings.h (+4 -7)
📝 src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp (+34 -134)
📝 src/cascadia/TerminalApp/pch.h (+0 -2)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/1293 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 6/17/2019 **Status:** ✅ Merged **Merged:** 6/18/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/duhowett/nomoreappdata` --- ### 📝 Commits (1) - [`67ecb4a`](https://github.com/microsoft/terminal/commit/67ecb4aba561ddd801aecbd679481cc1f471a0d6) Switch away from Windows.Storage.ApplicationData ### 📊 Changes **4 files changed** (+45 additions, -156 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.cpp` (+7 -13) 📝 `src/cascadia/TerminalApp/CascadiaSettings.h` (+4 -7) 📝 `src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp` (+34 -134) 📝 `src/cascadia/TerminalApp/pch.h` (+0 -2) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:04:03 +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#24566