mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Workspaces] Fix snapping Discord (#34602)
This commit is contained in:
@@ -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{
|
return AppData{
|
||||||
.installPath = appPath
|
.installPath = appPath
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user