Backup Bugfixes

- fixed the zip utils to read the file contents before backup.
- added new content backup metho for support zip creation.
This commit is contained in:
Brett Hewitson 2022-05-08 20:07:13 +10:00
parent 5374f8c7da
commit 1fc9bc87e4
13 changed files with 143 additions and 80 deletions

View file

@ -328,20 +328,23 @@ namespace ServerManagerTool.Lib
onlinePlayers.Add(newPlayer);
var playerJoined = false;
_players.AddOrUpdate(newPlayer.PlayerId,
(k) =>
{
playerJoined = true;
return newPlayer;
},
(k, v) =>
{
playerJoined = !v.IsOnline;
v.PlayerName = newPlayer.PlayerName;
v.IsOnline = newPlayer.IsOnline;
return v;
}
);
if (!string.IsNullOrWhiteSpace(newPlayer.PlayerName))
{
_players.AddOrUpdate(newPlayer.PlayerId,
(k) =>
{
playerJoined = true;
return newPlayer;
},
(k, v) =>
{
playerJoined = !v.IsOnline;
v.PlayerName = newPlayer.PlayerName;
v.IsOnline = newPlayer.IsOnline;
return v;
}
);
}
if (playerJoined)
{