Fixed a bug with the Server Shutdown when the CheckForOnlinePlayers option not selected.

Fixed a bug when the backup path was a root directory that caused a 'Invalid URI: A Dos path must be rooted, for example' crash.
Language File updates
This commit is contained in:
Brett Hewitson 2021-12-15 10:50:04 +10:00
parent 4513fe119b
commit bfc8b87872
14 changed files with 199 additions and 379 deletions

View file

@ -423,6 +423,16 @@ namespace ServerManagerTool.Lib
LogProfileMessage("Starting shutdown timer...");
var minutesLeft = ShutdownInterval;
if (ServerProcess == ServerProcessType.Stop)
{
LogProfileMessage($"Server shutdown type is {ServerProcess}, shutdown timer cancelled.");
minutesLeft = 0;
}
else if (!CheckForOnlinePlayers)
{
LogProfileMessage("CheckForOnlinePlayers disabled, shutdown timer will not perform online player check.");
}
while (minutesLeft > 0)
{
if (cancellationToken.IsCancellationRequested)
@ -466,7 +476,6 @@ namespace ServerManagerTool.Lib
else
{
Debug.WriteLine($"CheckForOnlinePlayers disabled, shutdown timer cancelled.");
break;
}
var message = string.Empty;