2
0
This commit is contained in:
glax 2023-07-31 01:58:00 +02:00
parent e3201a9b99
commit f832fe0de3

View File

@ -15,7 +15,9 @@ public static class Migrator
if (!File.Exists(settingsFilePath))
return;
JsonNode settingsNode = JsonNode.Parse(File.ReadAllText(settingsFilePath))!;
ushort version = settingsNode["version"]!.GetValue<ushort>();
ushort version = settingsNode["version"] is not null
? settingsNode["version"].GetValue<ushort>()
: settingsNode["ts"]["version"].GetValue<ushort>();
logger?.WriteLine("Migrator", $"Migrating {version} -> {CurrentVersion}");
switch (version)
{