mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
Move commandline initialization after cwd setting
This fixes an issue where the log file is written to the original directory, even if --working-directory=path was used. This can obviously be pretty bad.
This commit is contained in:
parent
e043361abb
commit
29f8d29e33
10
src/main.cpp
10
src/main.cpp
@ -77,11 +77,6 @@ int main(int argc, char** argv) {
|
||||
|
||||
int BeamMPServerMain(MainArguments Arguments) {
|
||||
setlocale(LC_ALL, "C");
|
||||
Application::InitializeConsole();
|
||||
Application::SetSubsystemStatus("Main", Application::Status::Starting);
|
||||
|
||||
SetupSignalHandlers();
|
||||
|
||||
ArgsParser Parser;
|
||||
Parser.RegisterArgument({ "help" }, ArgsParser::NONE);
|
||||
Parser.RegisterArgument({ "version" }, ArgsParser::NONE);
|
||||
@ -121,6 +116,11 @@ int BeamMPServerMain(MainArguments Arguments) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Application::InitializeConsole();
|
||||
Application::SetSubsystemStatus("Main", Application::Status::Starting);
|
||||
|
||||
SetupSignalHandlers();
|
||||
|
||||
bool Shutdown = false;
|
||||
Application::RegisterShutdownHandler([&Shutdown] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user