Check if BeamMP.zip exists before hashing

This commit is contained in:
Tixx 2025-06-08 14:01:48 +02:00
parent 9c53f86593
commit 51d096deac
No known key found for this signature in database
GPG Key ID: EC6E7A2BAABF0B8C

View File

@ -325,7 +325,7 @@ void PreGame(const beammp_fs_string& GamePath) {
std::string ZipPath(GetGamePath() / R"(mods/multiplayer/beammp.zip)");
#endif
std::string FileHash = Utils::GetSha256HashReallyFast(ZipPath);
std::string FileHash = fs::exists(ZipPath) ? Utils::GetSha256HashReallyFast(ZipPath) : "";
if (FileHash != LatestHash) {
info("Downloading BeamMP Update " + LatestHash);