From 70674f900ebb2339f8e8cc44460b4942ccaa19ec Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Mon, 20 Nov 2023 18:20:34 -0600 Subject: [PATCH] Fix invalid manifests on disk throwing parsing errors when installing game Fixes #38 --- LANCommander.SDK/GameManager.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/LANCommander.SDK/GameManager.cs b/LANCommander.SDK/GameManager.cs index 49ab72f..7600d62 100644 --- a/LANCommander.SDK/GameManager.cs +++ b/LANCommander.SDK/GameManager.cs @@ -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) {