Skip to content

Commit 2bad369

Browse files
committed
Slightly change the logic, explicitAppId didn't work
1 parent f689c9c commit 2bad369

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/Desktop/Win32AppInfo.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ public static Win32AppInfo Get()
3737

3838
// First get the app ID
3939
IApplicationResolver appResolver = (IApplicationResolver)new CAppResolver();
40-
appResolver.GetAppIDForProcess(Convert.ToUInt32(process.Id), out string appId, out _, out bool explicitAppId, out _);
40+
appResolver.GetAppIDForProcess(Convert.ToUInt32(process.Id), out string appId, out _, out _, out _);
4141

4242
string aumid;
4343

44-
// If it has an explicit app ID
45-
if (explicitAppId)
44+
// If it contains a backslash
45+
if (appId.Contains('\\'))
4646
{
47-
// Use as-is
48-
aumid = appId;
47+
// For versions 19042 and older of Windows 10, we can't use backslashes - Issue #3870
48+
// So we change it to not include those
49+
aumid = appId.Replace('\\', '/');
4950
}
5051
else
5152
{
52-
// Otherwise, it's a full-path, like C:\Program Files\..., and for versions 19042 and older of
53-
// Windows 10, we can't use a full path - Issue #3870, so we change it to not be recognized as a path.
54-
aumid = appId.Replace('\\', '/');
53+
// Use as-is
54+
aumid = appId;
5555
}
5656

5757
// If the AUMID is too long

0 commit comments

Comments
 (0)