Fix invalid manifests on disk throwing parsing errors when installing game
Fixes #38
This commit is contained in:
parent
f21bf4801e
commit
70674f900e
1 changed files with 9 additions and 2 deletions
|
@ -56,8 +56,15 @@ namespace LANCommander.SDK
|
|||
|
||||
var destination = Path.Combine(DefaultInstallDirectory, game.Title.SanitizeFilename());
|
||||
|
||||
if (ManifestHelper.Exists(destination))
|
||||
manifest = ManifestHelper.Read(destination);
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue