mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-18 06:10:10 +00:00
remove .delete_me file on startup if it exists
this is an artifact from the --update process on windows
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
#include "TServer.h"
|
#include "TServer.h"
|
||||||
#include "Update.h"
|
#include "Update.h"
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
@@ -95,6 +96,11 @@ int BeamMPServerMain(MainArguments Arguments) {
|
|||||||
Update::PerformUpdate(Arguments.InvokedAs);
|
Update::PerformUpdate(Arguments.InvokedAs);
|
||||||
return 123;
|
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";
|
std::string ConfigPath = "ServerConfig.toml";
|
||||||
if (Parser.FoundArgument({ "config" })) {
|
if (Parser.FoundArgument({ "config" })) {
|
||||||
|
|||||||
Reference in New Issue
Block a user