mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Improve code quality
This commit is contained in:
parent
73a6fb6f65
commit
135fd03f88
1 changed files with 10 additions and 14 deletions
|
|
@ -57,19 +57,17 @@ public static class PluginInstallationHelper
|
|||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
throw new FileNotFoundException($"Plugin {newPlugin.ID} zip file not found at {filePath}", filePath);
|
||||
}
|
||||
throw new FileNotFoundException($"Plugin {newPlugin.ID} zip file not found at {filePath}", filePath);
|
||||
}
|
||||
|
||||
App.API.InstallPlugin(newPlugin, filePath);
|
||||
App.API.InstallPlugin(newPlugin, filePath);
|
||||
|
||||
if (!newPlugin.IsFromLocalInstallPath)
|
||||
{
|
||||
File.Delete(filePath);
|
||||
}
|
||||
if (!newPlugin.IsFromLocalInstallPath)
|
||||
{
|
||||
File.Delete(filePath);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
@ -201,10 +199,8 @@ public static class PluginInstallationHelper
|
|||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
await App.API.UpdatePluginAsync(oldPlugin, newPlugin, filePath);
|
||||
}
|
||||
|
||||
await App.API.UpdatePluginAsync(oldPlugin, newPlugin, filePath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue