mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-08-16 00:06:41 +00:00
Fix launcher update to delete backup after download
This commit is contained in:
parent
e7cfb6e406
commit
e6e5bf8327
@ -179,14 +179,15 @@ void CheckForUpdates(const std::string& CV) {
|
|||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
error("Auto update is NOT implemented for the Linux version. Please update manually ASAP as updates contain security patches.");
|
error("Auto update is NOT implemented for the Linux version. Please update manually ASAP as updates contain security patches.");
|
||||||
#else
|
#else
|
||||||
fs::remove(Back);
|
|
||||||
fs::rename(EP, Back);
|
|
||||||
info("Downloading Launcher update " + LatestHash);
|
info("Downloading Launcher update " + LatestHash);
|
||||||
HTTP::Download(
|
HTTP::Download(
|
||||||
"https://backend.beammp.com/builds/launcher?download=true"
|
"https://backend.beammp.com/builds/launcher?download=true"
|
||||||
"&pk="
|
"&pk="
|
||||||
+ PublicKey + "&branch=" + Branch,
|
+ PublicKey + "&branch=" + Branch,
|
||||||
EP);
|
beammp_wide("new_") + EP);
|
||||||
|
fs::remove(Back, ec);
|
||||||
|
fs::rename(EP, Back);
|
||||||
|
fs::rename(beammp_wide("new_") + EP, EP);
|
||||||
URelaunch();
|
URelaunch();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user