Skip to content

Commit

Permalink
Fix for broken downloads not failing if another is cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
AntlerForce committed Nov 24, 2024
1 parent 2aa0d52 commit 7e07737
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LuaMenu/widgets/sl_loopback.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e07737

Please sign in to comment.