Move stablestorage check to path selection screen

Also forced stablepath to be empty during auto detection so it checks other sources to load ipc from
This commit is contained in:
Shivam
2020-05-18 00:47:31 +02:00
parent 59b006f9ac
commit 9bfdfbea43
3 changed files with 11 additions and 9 deletions

View File

@ -232,16 +232,15 @@ namespace osu.Game.Tournament.IPC
private string findFromJsonConfig()
{
Logger.Log("Trying to find stable through the json config");
if (tournamentStorage.Exists(stable_config))
try
{
using (Stream stream = tournamentStorage.GetStream(stable_config, FileAccess.Read, FileMode.Open))
using (var sr = new StreamReader(stream))
{
stableInfo = JsonConvert.DeserializeObject<StableInfo>(sr.ReadToEnd());
Logger.Log("Trying to find stable through the json config");
if (!string.IsNullOrEmpty(stableInfo.StablePath.Value))
return stableInfo.StablePath.Value;
}
}
catch
{
}
return null;