From 38494bb33a0dad8dee1ebb414ae9348c2b23e4fe Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Fri, 29 Dec 2023 00:02:56 +0100 Subject: [PATCH] remove .delete_me file on startup if it exists this is an artifact from the --update process on windows --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index b13d16de..32ef9f46 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,6 +13,7 @@ #include "TServer.h" #include "Update.h" +#include #include #include @@ -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" })) {