Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Skia] ApplicationData.Current.LocalFolder redirects to %appdata% #8910

Closed
Tracked by #8339
jeromelaban opened this issue May 28, 2022 · 4 comments · Fixed by #12596
Closed
Tracked by #8339

[Skia] ApplicationData.Current.LocalFolder redirects to %appdata% #8910

jeromelaban opened this issue May 28, 2022 · 4 comments · Fixed by #12596
Assignees
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/bug Something isn't working project/non-ui ⚙️ Categorizes an issue or PR as relevant to winrt (non-ui)

Comments

@jeromelaban
Copy link
Member

jeromelaban commented May 28, 2022

Current behavior

ApplicationData.Current.LocalFolder redirects to %appdata%, but should redirect to a more app-specific folder.

Expected behavior

Writing to ApplicationData.Current.LocalFolder should be specific to the running app.

Anything else we need to know?

Note for contributors

The behavior for this is currently undefined, as it is mapped to the UWP behavior. We should be mapping to the behavior that ApplicationData.Current.LocalFolder shows when running a unpackaged WinAppSDK app for the same API.

@jeromelaban jeromelaban added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. project/non-ui ⚙️ Categorizes an issue or PR as relevant to winrt (non-ui) and removed triage/untriaged Indicates an issue requires triaging or verification labels May 28, 2022
@MartinZikmund MartinZikmund added difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels May 30, 2022
@MartinZikmund
Copy link
Member

This will be a breaking change, but should probably be done soon.

@MartinZikmund
Copy link
Member

@jeromelaban I think this is one of the breaking changes that are really needed for the next major release

@MartinZikmund
Copy link
Member

Currently unpackaged WinAppSDK apps just crash when ApplicationData.Current is used. See microsoft/WindowsAppSDK#2639, microsoft/WindowsAppSDK#2621 .

Because we have the Package.appxmanifest, I think for the default behavior we can read the publisher and app id from there, and also provide a FeatureConfiguration to let the developer to override the path and store the app data/settings somewhere else as needed, does that sound like a good solution @jeromelaban ?

@MartinZikmund MartinZikmund self-assigned this Feb 27, 2023
@jeromelaban
Copy link
Member Author

altering the path using publisher and appid makes sense yes, as for feature configuration, I wonder if an helper class would be more appropriate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers kind/bug Something isn't working project/non-ui ⚙️ Categorizes an issue or PR as relevant to winrt (non-ui)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants