mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-02 15:55:30 +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:
parent
a89b51ca50
commit
38494bb33a
@ -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" })) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user