Commit 5dd215d
authored
AppDataPaths::LocalAppData throws, not Get*
This code when run in an unpackaged app (say, a test environment) succeeds and returns an AppDataPaths instance, but the app-specific properties fail.
```c++
std::filesystem::path GetApplicationData(winrt::Windows::System::User user)
{
auto paths = user ? winrt::Windows::Storage::AppDataPaths::GetForUser(user) : winrt::Windows::Storage::AppDataPaths::GetDefault();
return std::wstring_view{ paths.LocalAppData().c_str() };
}
```
Updated the remarks to match the behavior.1 parent 1773497 commit 5dd215d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments