Merge pull request 'version' (!50) from cuttingedge into master
Reviewed-on: #50
This commit is contained in:
commit
df8538c3b4
@ -15,7 +15,9 @@ public static class Migrator
|
|||||||
if (!File.Exists(settingsFilePath))
|
if (!File.Exists(settingsFilePath))
|
||||||
return;
|
return;
|
||||||
JsonNode settingsNode = JsonNode.Parse(File.ReadAllText(settingsFilePath))!;
|
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}");
|
logger?.WriteLine("Migrator", $"Migrating {version} -> {CurrentVersion}");
|
||||||
switch (version)
|
switch (version)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user