This commit is contained in:
Halgari 2022-10-19 12:28:59 -06:00
parent 8fe943e4a4
commit beeeec95e1
2 changed files with 18 additions and 8 deletions

View File

@ -1,5 +1,8 @@
### Changelog
#### Version - 3.0.2.2 - 10/19/2022
* HOTFIX: make game detection *even more* safe against crashes
#### Version - 3.0.2.1 - 10/19/2022
* HOTFIX: make game detection more safe against crashes

View File

@ -86,22 +86,29 @@ public class GameLocator : IGameLocator
{
foreach (var (game, error) in games)
{
if (game is not null)
try
{
var path = getPath(game).ToAbsolutePath();
if (path.DirectoryExists())
if (game is not null)
{
paths[getId(game)] = path;
_logger.LogDebug("Found Game {} at {}", game, path);
var path = getPath(game).ToAbsolutePath();
if (path.DirectoryExists())
{
paths[getId(game)] = path;
_logger.LogDebug("Found Game {} at {}", game, path);
}
else
{
_logger.LogError("Game {} does not exist at {}", game, path);
}
}
else
{
_logger.LogError("Game {} does not exist at {}", game, path);
_logger.LogError("{}", error);
}
}
else
catch (Exception ex)
{
_logger.LogError("{}", error);
_logger.LogError(ex, "While locating game {Game}", game);
}
}
}