From 324c1fcee33f12292147feadf27b8973fb5808ae Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 6 Aug 2024 16:59:04 -0400 Subject: [PATCH] Fix build for older .NET --- CHANGELIST.md | 1 + MPF.Frontend/Tools/PhysicalTool.cs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 62fc5009..535bb35b 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -5,6 +5,7 @@ - Add comments around default options object - Fix usings ordering in ItemHelper - Add physical drive extensions to new tool +- Fix build for older .NET ### 3.2.1 (2024-08-05) diff --git a/MPF.Frontend/Tools/PhysicalTool.cs b/MPF.Frontend/Tools/PhysicalTool.cs index 772ae110..fefd0487 100644 --- a/MPF.Frontend/Tools/PhysicalTool.cs +++ b/MPF.Frontend/Tools/PhysicalTool.cs @@ -26,7 +26,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't get exe name - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // Get the two paths that we will need to check @@ -85,7 +85,7 @@ namespace MPF.Frontend.Tools return false; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return false; // Get the executable name @@ -135,7 +135,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // Get the SYSTEM.CNF path to check @@ -162,7 +162,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // Attempt to use PS3_DISC.SFB @@ -218,7 +218,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // Attempt to use PS3_DISC.SFB @@ -276,7 +276,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // Attempt to read from /PS3_UPDATE/PS3UPDAT.PUP @@ -318,7 +318,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // If we can't find param.sfo, we don't have a PlayStation 4 disc @@ -356,7 +356,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // If we can't find param.sfo, we don't have a PlayStation 4 disc @@ -440,7 +440,7 @@ namespace MPF.Frontend.Tools return null; // If the folder no longer exists, we can't do this part - if (!Directory.Exists(drive.Name)) + if (!Directory.Exists(drive!.Name)) return null; // If we can't find param.json, we don't have a PlayStation 5 disc