make sure file doesn't exist before trying to download

This commit is contained in:
IsWaffle 2024-03-24 09:14:51 -04:00
parent 1f9ace4763
commit a7f3f989bb

View File

@ -22,6 +22,11 @@ public class MegaMirrorDownloader : MirrorDownloaderBase
try
{
var file = new FileInfo(Path.Join(DownloadCacheHelper.CachePath, "patcher"));
if (file.Exists)
{
file.Delete();
}
await megaClient.DownloadFileAsync(new Uri(MirrorInfo.Link),
file.FullName, progress);