From a7f3f989bb09818ac012adbadf6fe8310e69b383 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Sun, 24 Mar 2024 09:14:51 -0400 Subject: [PATCH] make sure file doesn't exist before trying to download --- .../Models/Mirrors/Downloaders/MegaMirrorDownloader.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SPTInstaller/Models/Mirrors/Downloaders/MegaMirrorDownloader.cs b/SPTInstaller/Models/Mirrors/Downloaders/MegaMirrorDownloader.cs index 5d4f949..5f08e4b 100644 --- a/SPTInstaller/Models/Mirrors/Downloaders/MegaMirrorDownloader.cs +++ b/SPTInstaller/Models/Mirrors/Downloaders/MegaMirrorDownloader.cs @@ -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);