Delete existing zip before downloading

This commit is contained in:
VictoriousRaptor 2023-11-12 11:42:13 +08:00
parent af9c662892
commit c18ae41e56

View file

@ -143,6 +143,11 @@ namespace Flow.Launcher.Plugin.PluginsManager
try
{
if (File.Exists(filePath))
{
File.Delete(filePath);
}
await Http.DownloadAsync(plugin.UrlDownload, filePath).ConfigureAwait(false);
Install(plugin, filePath);
@ -245,6 +250,11 @@ namespace Flow.Launcher.Plugin.PluginsManager
_ = Task.Run(async delegate
{
if (File.Exists(downloadToFilePath))
{
File.Delete(downloadToFilePath);
}
await Http.DownloadAsync(x.PluginNewUserPlugin.UrlDownload, downloadToFilePath)
.ConfigureAwait(false);