Fix invalid manifests on disk throwing parsing errors when installing game

Fixes #38
net8.0
Pat Hartl 2023-11-20 18:20:34 -06:00
parent f21bf4801e
commit 70674f900e
1 changed files with 9 additions and 2 deletions

View File

@ -56,8 +56,15 @@ namespace LANCommander.SDK
var destination = Path.Combine(DefaultInstallDirectory, game.Title.SanitizeFilename());
try
{
if (ManifestHelper.Exists(destination))
manifest = ManifestHelper.Read(destination);
}
catch (Exception ex)
{
Logger?.LogTrace(ex, "Error reading manifest before install");
}
if (manifest == null || manifest.Id != gameId)
{