From 9d93ac7052eb4124ea93ec32c73371601553ebc8 Mon Sep 17 00:00:00 2001 From: FenPhoenix Date: Fri, 27 Oct 2023 05:09:10 -0700 Subject: [PATCH] Work: -Don't timeout if fms dir is missing (fail immediately) -Don't set Installed = true on unavailable TDM FMs --- AngelLoader/TDM/TDMParser.cs | 6 +++++- AngelLoader/TDM/TDMWatchers.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AngelLoader/TDM/TDMParser.cs b/AngelLoader/TDM/TDMParser.cs index 9fdaa7128..3bbfc393f 100644 --- a/AngelLoader/TDM/TDMParser.cs +++ b/AngelLoader/TDM/TDMParser.cs @@ -45,7 +45,11 @@ internal static List ParseMissionsInfoFile() lines = File_ReadAllLines_List(missionsFile); break; } - catch(FileNotFoundException) + catch (DirectoryNotFoundException) + { + return new List(); + } + catch (FileNotFoundException) { return new List(); } diff --git a/AngelLoader/TDM/TDMWatchers.cs b/AngelLoader/TDM/TDMWatchers.cs index cdc0b22cc..07f367754 100644 --- a/AngelLoader/TDM/TDMWatchers.cs +++ b/AngelLoader/TDM/TDMWatchers.cs @@ -158,7 +158,7 @@ private static void UpdateTDMInstalledFMStatus() // @TDM(Case-sensitivity/UpdateTDMInstalledFMStatus): Case-sensitive compare // Case-sensitive compare of the dir name from currentfm.txt and the dir name from our // list. - fm.Installed = fmName != null && fm.TDMInstalledDir == fmName; + fm.Installed = fmName != null && !fm.MarkedUnavailable && fm.TDMInstalledDir == fmName; } }