From e4e24d1831eaa9c45f238c5b8f9c211edbc2b749 Mon Sep 17 00:00:00 2001 From: Loporrit <141286461+loporrit@users.noreply.github.com> Date: Wed, 7 May 2025 04:52:23 +0000 Subject: [PATCH] Avoid missing blk file errors on early download abort --- MareSynchronos/WebAPI/Files/FileDownloadManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MareSynchronos/WebAPI/Files/FileDownloadManager.cs b/MareSynchronos/WebAPI/Files/FileDownloadManager.cs index 7368001..f1734b1 100644 --- a/MareSynchronos/WebAPI/Files/FileDownloadManager.cs +++ b/MareSynchronos/WebAPI/Files/FileDownloadManager.cs @@ -295,6 +295,11 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase } catch (OperationCanceledException) { + if (!fi.Exists) + { + Logger.LogDebug("{dlName}: Detected early cancellation of download", fi.Name); + return; + } Logger.LogDebug("{dlName}: Detected cancellation of download, partially extracting files for {id}", fi.Name, gameObjectHandler); } catch (Exception ex)