mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
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:
parent
5374f8c7da
commit
1fc9bc87e4
13 changed files with 143 additions and 80 deletions
|
|
@ -1962,7 +1962,7 @@ namespace ServerManagerTool.Lib
|
|||
var saveFolderInfo = new DirectoryInfo(saveFolder);
|
||||
|
||||
// backup the world save file
|
||||
ZipUtils.ZipAFile(backupFile, worldFileName, worldFile, comment.ToString());
|
||||
ZipUtils.ZipFile(backupFile, worldFileName, worldFile, comment.ToString());
|
||||
|
||||
if (Config.Default.AutoBackup_IncludeSaveGamesFolder)
|
||||
{
|
||||
|
|
@ -1976,7 +1976,7 @@ namespace ServerManagerTool.Lib
|
|||
var saveGamesFiles = saveGamesFolderInfo.GetFiles(saveGamesFileFilter, SearchOption.AllDirectories);
|
||||
foreach (var file in saveGamesFiles)
|
||||
{
|
||||
ZipUtils.ZipAFile(backupFile, file.FullName.Replace(saveGamesFolder, Config.Default.SaveGamesRelativePath), file.FullName);
|
||||
ZipUtils.ZipFile(backupFile, file.FullName.Replace(saveGamesFolder, Config.Default.SaveGamesRelativePath), file.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue