Skip to content

Commit

Permalink
Re-validate user configs before actually selecting them.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErisApps committed Sep 30, 2021
1 parent 16d13b5 commit dd70329
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions HitScoreVisualizer/Services/ConfigProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,11 @@ internal async Task SelectUserConfig(ConfigFileInfo configFileInfo)
_siraLog.Debug($"Config migration finished successfully and updated config is stored to disk at path: '{existingConfigFullPath}'");
}

_currentConfig = configFileInfo.Configuration;
_hsvConfig.ConfigFilePath = configFileInfo.ConfigPath;
if (Validate(configFileInfo.Configuration!, configFileInfo.ConfigName))
{
_currentConfig = configFileInfo.Configuration;
_hsvConfig.ConfigFilePath = configFileInfo.ConfigPath;
}
}

internal void UnselectUserConfig()
Expand Down

0 comments on commit dd70329

Please sign in to comment.