Check download confirmation packet

This commit is contained in:
Tixx 2025-05-01 20:47:16 +02:00
parent 25a1061700
commit 4de0bc9a40
No known key found for this signature in database
GPG Key ID: EC6E7A2BAABF0B8C

View File

@ -557,6 +557,12 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vector<Mo
break;
}
if (Data != "AG") {
UUl("Received corrupted download confirmation, aborting download.");
Terminate = true;
break;
}
std::string Name = std::to_string(ModNo) + "/" + std::to_string(TotalMods) + ": " + FName;
std::vector<char> DownloadedFile = SingleNormalDownload(Sock, ModInfoIter->FileSize, Name);