Fixes bugs in world save (#297)
- [X] Fixes bugs in the buffer writer
- [X] Removes background save commands
- [X] Avoids calling Serialize() on deserialization
- In a future optimization I will copy the entire object to a buffer, deserialize using a SpanReader, then use that buffer for the SaveBuffer
- [X] Fixes issue with decay queue.
Bumps release version
This commit is contained in:
parent
daf48ebdf2
commit
55935d30b4
12 changed files with 122 additions and 153 deletions
|
|
@ -50,7 +50,7 @@ namespace Server.Misc
|
|||
|
||||
if (m_Warning == TimeSpan.Zero)
|
||||
{
|
||||
Save(true);
|
||||
Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -85,12 +85,7 @@ namespace Server.Misc
|
|||
|
||||
public static void Save()
|
||||
{
|
||||
Save(false);
|
||||
}
|
||||
|
||||
public static void Save(bool permitBackgroundWrite)
|
||||
{
|
||||
if (AutoRestart.Restarting)
|
||||
if (AutoRestart.Restarting || !World.Running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -118,10 +113,7 @@ namespace Server.Misc
|
|||
|
||||
var root = Path.Combine(Core.BaseDirectory, "Backups/Automatic");
|
||||
|
||||
if (!Directory.Exists(root))
|
||||
{
|
||||
Directory.CreateDirectory(root);
|
||||
}
|
||||
AssemblyHandler.EnsureDirectory(root);
|
||||
|
||||
var existing = Directory.GetDirectories(root);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue