From 7e0773729e2bd8f9104ec99b3c553d18fcb0bfaa Mon Sep 17 00:00:00 2001 From: Moose <124457076+AntlerForce@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:19:12 -0700 Subject: [PATCH] Fix for broken downloads not failing if another is cancelled --- LuaMenu/widgets/sl_loopback.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LuaMenu/widgets/sl_loopback.lua b/LuaMenu/widgets/sl_loopback.lua index 58c184806..806400a60 100644 --- a/LuaMenu/widgets/sl_loopback.lua +++ b/LuaMenu/widgets/sl_loopback.lua @@ -141,14 +141,14 @@ local function DownloadFinished(command) return false end - download, dlIndex = FindNameReceivedInDownloads(command.name) + download, dlIndex = FindNameReceivedInDownloads(command.name) if not download then Spring.Log(LOG_SECTION, LOG.ERROR, "Received command.name couldn't be matched to any known download:", command.name) return false end - + WG.DownloadWrapperInterface.DownloadFinished(download.name, download.type, command.isSuccess, command.isAborted) - table.remove(downloads, i) + table.remove(downloads, dlIndex) end -- reports download progress. 100 might not indicate completion, wait for DownloadFinished