Skip to content

Commit

Permalink
Adds snapshot path guard
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman committed Feb 2, 2025
1 parent 6fee2e3 commit bdbdfd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Projects/Server/World/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ internal static void Snapshot(string snapshotPath)
{
_serializationStart = Core.Now;

if (string.IsNullOrEmpty(snapshotPath))
{
throw new ArgumentException("Snapshot path cannot be null or empty", nameof(snapshotPath));
}

Persistence.SerializeAll();
PauseSerializationThreads();
EventSink.InvokeWorldSave();
Expand Down

0 comments on commit bdbdfd8

Please sign in to comment.