Fix updating logic

This commit is contained in:
Tixx
2025-09-16 17:52:30 +02:00
parent 77f3375658
commit be7594039e

View File

@@ -215,7 +215,7 @@ void CheckForUpdates(const std::string& CV) {
"https://backend.beammp.com/builds/launcher?download=true" "https://backend.beammp.com/builds/launcher?download=true"
"&pk=" "&pk="
+ PublicKey + "&branch=" + Branch, + PublicKey + "&branch=" + Branch,
beammp_wide("new_") + BP, LatestHash); GetBP() / (beammp_wide("new_") + GetEN()), LatestHash);
std::error_code ec; std::error_code ec;
fs::remove(Back, ec); fs::remove(Back, ec);
if (ec == std::errc::permission_denied) { if (ec == std::errc::permission_denied) {
@@ -224,7 +224,7 @@ void CheckForUpdates(const std::string& CV) {
} else { } else {
fs::rename(BP, Back); fs::rename(BP, Back);
} }
fs::rename(beammp_wide("new_") + BP, BP); fs::rename(GetBP() / (beammp_wide("new_") + GetEN()), BP);
URelaunch(); URelaunch();
#endif #endif
} else { } else {