From e6e5bf832778ada0e9e4b1a478528b3cf6aff092 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:32:17 +0200 Subject: [PATCH] Fix launcher update to delete backup after download --- src/Startup.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Startup.cpp b/src/Startup.cpp index 480566b..9ab0eae 100644 --- a/src/Startup.cpp +++ b/src/Startup.cpp @@ -179,14 +179,15 @@ void CheckForUpdates(const std::string& CV) { #if defined(__linux__) error("Auto update is NOT implemented for the Linux version. Please update manually ASAP as updates contain security patches."); #else - fs::remove(Back); - fs::rename(EP, Back); info("Downloading Launcher update " + LatestHash); HTTP::Download( "https://backend.beammp.com/builds/launcher?download=true" "&pk=" + PublicKey + "&branch=" + Branch, - EP); + beammp_wide("new_") + EP); + fs::remove(Back, ec); + fs::rename(EP, Back); + fs::rename(beammp_wide("new_") + EP, EP); URelaunch(); #endif } else {