diff --git a/CHANGELIST.md b/CHANGELIST.md index 06c81255..888ce32e 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -1,6 +1,7 @@ ### WIP (xxxx-xx-xx) - Option for default Redumper leadin retries (Deterous) +- Omit false positives on formatting protections ### 3.1.7 (2024-04-28) diff --git a/MPF.Core/Protection.cs b/MPF.Core/Protection.cs index d14c4a27..1b95c892 100644 --- a/MPF.Core/Protection.cs +++ b/MPF.Core/Protection.cs @@ -296,7 +296,7 @@ namespace MPF.Core // SafeDisc if (foundProtections.Any(p => p.StartsWith("SafeDisc"))) { - if (foundProtections.Any(p => Regex.IsMatch(p, @"SafeDisc [0-9]\.[0-9]{2}\.[0-9]{3}", RegexOptions.Compiled))) + if (foundProtections.Any(p => Regex.IsMatch(p, @"SafeDisc [0-9]\.[0-9]{2}\.[0-9]{3}", RegexOptions.Compiled) && !p.StartsWith("Macrovision Protection File"))) { foundProtections = foundProtections.Where(p => !p.StartsWith("Macrovision Protected Application")) .Where(p => !p.StartsWith("Macrovision Protection File")) @@ -307,7 +307,7 @@ namespace MPF.Core .Where(p => p != "SafeDisc 1/Lite") .Where(p => p != "SafeDisc 2+"); } - else if (foundProtections.Any(p => Regex.IsMatch(p, @"SafeDisc [0-9]\.[0-9]{2}\.[0-9]{3}-[0-9]\.[0-9]{2}\.[0-9]{3}", RegexOptions.Compiled))) + else if (foundProtections.Any(p => Regex.IsMatch(p, @"SafeDisc [0-9]\.[0-9]{2}\.[0-9]{3}-[0-9]\.[0-9]{2}\.[0-9]{3}", RegexOptions.Compiled) && !p.StartsWith("Macrovision Protection File"))) { foundProtections = foundProtections.Where(p => !p.StartsWith("Macrovision Protected Application")) .Where(p => !p.StartsWith("Macrovision Protection File")) @@ -317,7 +317,7 @@ namespace MPF.Core .Where(p => p != "SafeDisc 1/Lite") .Where(p => p != "SafeDisc 2+"); } - else if (foundProtections.Any(p => Regex.IsMatch(p, @"SafeDisc [0-9]\.[0-9]{2}\.[0-9]{3}/+", RegexOptions.Compiled))) + else if (foundProtections.Any(p => Regex.IsMatch(p, @"SafeDisc [0-9]\.[0-9]{2}\.[0-9]{3}/+", RegexOptions.Compiled) && !p.StartsWith("Macrovision Protection File"))) { foundProtections = foundProtections.Where(p => !p.StartsWith("Macrovision Protected Application")) .Where(p => !p.StartsWith("Macrovision Protection File"))