diff --git a/src/Network/Resources.cpp b/src/Network/Resources.cpp index 1fe99fc..c5e0cc4 100644 --- a/src/Network/Resources.cpp +++ b/src/Network/Resources.cpp @@ -475,9 +475,10 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vectorHash.length() < 8 || ModInfoIter->HashAlgorithm != "sha256") { error("Unsupported hash algorithm or invalid hash for '" + ModInfoIter->FileName + "'"); Terminate = true; @@ -487,6 +488,7 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vectorHash) { debug("Mod '" + FileName + "' found in cache"); + UpdateUl(false, std::to_string(ModNo) + "/" + std::to_string(TotalMods) + ": " + ModInfoIter->FileName); std::this_thread::sleep_for(std::chrono::milliseconds(50)); try { if (!fs::exists(GetGamePath() + "mods/multiplayer")) { @@ -517,6 +519,7 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vectorFileName).filename(); fs::exists(OldCachedPath) && GetSha256HashReallyFast(OldCachedPath.string()) == ModInfoIter->Hash) { debug("Mod '" + FileName + "' found in old cache, copying it to the new cache"); + UpdateUl(false, std::to_string(ModNo) + "/" + std::to_string(TotalMods) + ": " + ModInfoIter->FileName); std::this_thread::sleep_for(std::chrono::milliseconds(50)); try { fs::copy_file(OldCachedPath, PathToSaveTo, fs::copy_options::overwrite_existing); @@ -551,7 +554,7 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vectorProtected && false) { + if (ModInfoIter->Protected) { std::string message = "Mod '" + ModInfoIter->FileName + "' is protected and therefore must be placed in the Resources/Caching folder manually here: " + fs::absolute(CachingDirectory).string(); error(message); @@ -621,7 +624,6 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vector