mirror of
https://github.com/microsoft/PowerToys
synced 2024-11-22 00:03:48 +00:00
[Workspaces] Fix snapping Discord (#34602)
This commit is contained in:
parent
afc469c7ab
commit
43654a32b4
@ -238,6 +238,23 @@ namespace Utils
|
||||
}
|
||||
}
|
||||
|
||||
// try by name if path not found
|
||||
// apps list could contain a different path from that one we get from the process (for electron)
|
||||
std::wstring exeName = std::filesystem::path(appPath).stem();
|
||||
std::wstring exeNameUpper(exeName);
|
||||
std::transform(exeNameUpper.begin(), exeNameUpper.end(), exeNameUpper.begin(), towupper);
|
||||
|
||||
for (const auto& appData : apps)
|
||||
{
|
||||
std::wstring appNameUpper(appData.name);
|
||||
std::transform(appNameUpper.begin(), appNameUpper.end(), appNameUpper.begin(), towupper);
|
||||
|
||||
if (appNameUpper == exeNameUpper)
|
||||
{
|
||||
return appData;
|
||||
}
|
||||
}
|
||||
|
||||
return AppData{
|
||||
.installPath = appPath
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user