mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[PowerToys Run] Fix corrupt/outdated plugins load crash (#12424)
* [PowerToys Run] Add type error catch and details * [PowerToys Run] don't load outdated config plugins Don't load plugins which don't have the new IcoPathDark and IcoPathLight fields.
This commit is contained in:
@@ -94,6 +94,12 @@ namespace PowerLauncher.Plugin
|
||||
return null;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(metadata.IcoPathDark) || string.IsNullOrEmpty(metadata.IcoPathLight))
|
||||
{
|
||||
Log.Error($"|PluginConfig.GetPluginMetadata|couldn't get icon information for config <{configPath}>", MethodBase.GetCurrentMethod().DeclaringType);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!File.Exists(metadata.ExecuteFilePath))
|
||||
{
|
||||
Log.Error($"|PluginConfig.GetPluginMetadata|execute file path didn't exist <{metadata.ExecuteFilePath}> for config <{configPath}", MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
Reference in New Issue
Block a user