Skip to content

Commit c907c29

Browse files
committed
Fix plugin install issue
1 parent 07bb16c commit c907c29

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,22 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
197197
prgBox.Close();
198198
prgBox = null;
199199
});
200-
201-
Install(plugin, filePath);
202200
}
203201
else
204202
{
205203
await Http.DownloadAsync(plugin.UrlDownload, filePath).ConfigureAwait(false);
206-
Install(plugin, filePath);
207204
}
208205
}
209206
else
210207
{
211208
filePath = plugin.LocalInstallPath;
212-
Install(plugin, filePath);
213209
}
210+
211+
// check if user cancelled download before installing plugin
212+
if (downloadCancelled)
213+
return;
214+
215+
Install(plugin, filePath);
214216
}
215217
catch (HttpRequestException e)
216218
{

0 commit comments

Comments
 (0)