Skip to content

Commit

Permalink
remove .delete_me file on startup if it exists
Browse files Browse the repository at this point in the history
this is an artifact from the --update process on windows
  • Loading branch information
lionkor committed Dec 28, 2023
1 parent a89b51c commit 38494bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "TServer.h"
#include "Update.h"

#include <filesystem>
#include <iostream>
#include <thread>

Expand Down Expand Up @@ -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" })) {
Expand Down

0 comments on commit 38494bb

Please sign in to comment.