api to use hardcoded jsonpath for now. Libation is fully functional again

This commit is contained in:
Robert McRackan 2020-08-20 14:47:26 -04:00
parent 57302e1b5c
commit 57ee150d3c
4 changed files with 29 additions and 16 deletions

View file

@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>3.1.12.127</Version>
<Version>3.1.12.136</Version>
</PropertyGroup>
<ItemGroup>

View file

@ -86,6 +86,13 @@ namespace LibationLauncher
static string AccountsSettingsFileLegacy30 => Path.Combine(Configuration.Instance.LibationFiles, "IdentityTokens.json");
private static void migrate_v3_to_v4()
{
migrateLegacyIdentityFile();
updateSettingsFile();
}
private static void migrateLegacyIdentityFile()
{
if (File.Exists(AccountsSettingsFileLegacy30))
{
@ -104,8 +111,6 @@ namespace LibationLauncher
// delete legacy token file
File.Delete(AccountsSettingsFileLegacy30);
}
updateSettingsFile();
}
private static void updateLegacyFileWithLocale()
@ -178,7 +183,7 @@ namespace LibationLauncher
// don't delete old settings until new values are used
// remember to remove these from Configuration.cs
throw new NotImplementedException();
return;
// use JObject to remove decrypt key and locale from Settings.json
var settingsContents = File.ReadAllText(Configuration.Instance.SettingsFilePath);