mirror of https://github.com/ppy/osu
Handle exception thrown due to custom stoage on startup
This commit is contained in:
parent
ab15b6031d
commit
cdcad94e9f
|
@ -34,8 +34,18 @@ public OsuStorage(GameHost host, Storage defaultStorage)
|
|||
var customStoragePath = storageConfig.Get<string>(StorageConfig.FullPath);
|
||||
|
||||
if (!string.IsNullOrEmpty(customStoragePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
ChangeTargetStorage(host.GetStorage(customStoragePath));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log($"Couldn't use custom storage path ({customStoragePath}): {ex}. Using default path.", LoggingTarget.Runtime, LogLevel.Error);
|
||||
ChangeTargetStorage(defaultStorage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ChangeTargetStorage(Storage newStorage)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue