remove .delete_me file on startup if it exists

this is an artifact from the --update process on windows
This commit is contained in:
Lion Kortlepel 2023-12-29 00:02:56 +01:00
parent a89b51ca50
commit 38494bb33a
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -13,6 +13,7 @@
#include "TServer.h"
#include "Update.h"
#include <filesystem>
#include <iostream>
#include <thread>
@ -95,6 +96,11 @@ int BeamMPServerMain(MainArguments Arguments) {
Update::PerformUpdate(Arguments.InvokedAs);
return 123;
}
// check that there is no old update file
auto OldFile = Arguments.InvokedAs + ".delete_me";
if (fs::exists(OldFile)) {
fs::remove(OldFile);
}
std::string ConfigPath = "ServerConfig.toml";
if (Parser.FoundArgument({ "config" })) {