From c3f76f4365520306b965b0cb1579d89bb967bba2 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sun, 20 Oct 2024 09:20:33 -0500 Subject: [PATCH] Ignore corrupted Steam shortcuts.vdf files --- Core/SteamLibrary.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/SteamLibrary.cs b/Core/SteamLibrary.cs index 79b9547e1..0d0c9605d 100644 --- a/Core/SteamLibrary.cs +++ b/Core/SteamLibrary.cs @@ -84,8 +84,9 @@ private static IEnumerable LibraryPathGames(KVSerializer acfParser, private static IEnumerable ShortcutsFileGames(KVSerializer vdfParser, string path) - => vdfParser.Deserialize>(File.OpenRead(path)) - .Select(nsg => nsg.NormalizeDir(path)); + => Utilities.DefaultIfThrows(() => vdfParser.Deserialize>(File.OpenRead(path))) + ?.Select(nsg => nsg.NormalizeDir(path)) + ?? Enumerable.Empty(); private const string registryKey = @"HKEY_CURRENT_USER\Software\Valve\Steam"; private const string registryValue = @"SteamPath";