World Save Zipping

- have changed the way the zip file is created. All files are now added to the zip in one pass, rather than as separate files.
This commit is contained in:
Brett Hewitson 2022-05-18 22:12:15 +10:00
parent 1c463ded1d
commit 99c4ed73fc
7 changed files with 121 additions and 184 deletions

View file

@ -2069,14 +2069,17 @@ namespace ServerManagerTool.Lib
var saveFolderInfo = new DirectoryInfo(saveFolder);
// backup the world save file
ZipUtils.ZipFile(backupFile, "", worldFile, comment.ToString());
var files = new Dictionary<string, List<string>>
{
{ "", new List<string> { worldFile } }
};
// backup the player files
var playerFileFilter = $"*{Config.Default.PlayerFileExtension}";
var playerFiles = saveFolderInfo.GetFiles(playerFileFilter, SearchOption.TopDirectoryOnly);
foreach (var file in playerFiles)
{
ZipUtils.ZipFile(backupFile, "", file.FullName);
files[""].Add(file.FullName);
}
// backup the tribe files
@ -2084,7 +2087,7 @@ namespace ServerManagerTool.Lib
var tribeFiles = saveFolderInfo.GetFiles(tribeFileFilter, SearchOption.TopDirectoryOnly);
foreach (var file in tribeFiles)
{
ZipUtils.ZipFile(backupFile, "", file.FullName);
files[""].Add(file.FullName);
}
// backup the tribute tribe files
@ -2092,7 +2095,7 @@ namespace ServerManagerTool.Lib
var tributeTribeFiles = saveFolderInfo.GetFiles(tributeTribeFileFilter, SearchOption.TopDirectoryOnly);
foreach (var file in tributeTribeFiles)
{
ZipUtils.ZipFile(backupFile, "", file.FullName);
files[""].Add(file.FullName);
}
if (Config.Default.AutoBackup_IncludeSaveGamesFolder)
@ -2107,11 +2110,17 @@ namespace ServerManagerTool.Lib
var saveGamesFiles = saveGamesFolderInfo.GetFiles(saveGamesFileFilter, SearchOption.AllDirectories);
foreach (var file in saveGamesFiles)
{
ZipUtils.ZipFile(backupFile, file.DirectoryName.Replace(saveGamesFolder, Config.Default.SaveGamesRelativePath), file.FullName);
var key = file.DirectoryName.Replace(saveGamesFolder, Config.Default.SaveGamesRelativePath);
if (files.ContainsKey(key))
files[key].Add(file.FullName);
else
files.Add(key, new List<string> { file.FullName });
}
}
}
ZipUtils.ZipFiles(backupFile, files, comment.ToString());
LogProfileMessage($"Backed up world files - {saveFolder}");
LogProfileMessage($"Backup file created - {backupFile}");

View file

@ -5,7 +5,30 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
<link href="http://arkservermanager.freeforums.net/" />
<updated>2022-05-15T00:00:00Z</updated>
<updated>2022-05-18T00:00:00Z</updated>
<entry>
<id>urn:uuid:D0681B47-5715-473E-99D3-63F475A997C4</id>
<title>1.1.429 (1.1.429.1)</title>
<summary>1.1.429.1</summary>
<link href="" />
<updated>2022-05-18T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>World Save Zipping - have changed the way the zip file is created. All files are now added to the zip in one pass, rather than as separate files.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:2E2A14AE-EE5B-4384-8143-BF5D1C8A487D</id>

View file

@ -8,111 +8,18 @@
<updated>2022-05-15T00:00:00Z</updated>
<entry>
<id>urn:uuid:2E2A14AE-EE5B-4384-8143-BF5D1C8A487D</id>
<title>1.1.428 (1.1.428.5)</title>
<summary>1.1.428.5</summary>
<id>urn:uuid:D0681B47-5715-473E-99D3-63F475A997C4</id>
<title>1.1.429 (1.1.429.1)</title>
<summary>1.1.429.1</summary>
<link href="" />
<updated>2022-05-15T00:00:00Z</updated>
<updated>2022-05-18T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>de-DE Translation file updated.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:2E2A14AE-EE5B-4384-8143-BF5D1C8A487D</id>
<title>1.1.428 (1.1.428.4)</title>
<summary>1.1.428.4</summary>
<link href="" />
<updated>2022-05-15T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>pt-BR Translation file updated.</li>
<li>ru-RU Translation file updated.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:2E2A14AE-EE5B-4384-8143-BF5D1C8A487D</id>
<title>1.1.428 (1.1.428.3)</title>
<summary>1.1.428.3</summary>
<link href="" />
<updated>2022-05-15T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Player List - adjusted the margin around the border of the players in the player list.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:2E2A14AE-EE5B-4384-8143-BF5D1C8A487D</id>
<title>1.1.428 (1.1.428.2)</title>
<summary>1.1.428.2</summary>
<link href="" />
<updated>2022-05-15T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Auto Process Task Priorities - Have added task priority droplists to the global settings, allowing the priority for each auto process task to be changed.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:2E2A14AE-EE5B-4384-8143-BF5D1C8A487D</id>
<title>1.1.428 (1.1.428.1)</title>
<summary>1.1.428.1</summary>
<link href="" />
<updated>2022-05-15T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">BUGFIX</u>
<br/>
<ul>
<li>Server Shutdown/Restart - rewritten the code that sends the RCON commands to prevent the hangs after the RCON command fails.</li>
<li>World Save Zipping - have changed the way the zip file is created. All files are now added to the zip in one pass, rather than as separate files.</li>
</ul>
</p>
</div>