diff --git a/CHANGELIST.md b/CHANGELIST.md index af5cb7f2..84f3e275 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -6,6 +6,7 @@ - Fix DVD layer finding corner case - Fix failing module tests - Add option to limit region and language selections +- Cap X360 directory check to 500MB ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Core/Data/Drive.cs b/MPF.Core/Data/Drive.cs index 557e77ad..912b9488 100644 --- a/MPF.Core/Data/Drive.cs +++ b/MPF.Core/Data/Drive.cs @@ -45,6 +45,11 @@ namespace MPF.Core.Data /// public bool MarkedActive => driveInfo?.IsReady ?? false; + /// + /// Represents the total size of the drive + /// + public long TotalSize => driveInfo?.TotalSize ?? default; + /// /// Media label as read by Windows /// @@ -279,7 +284,8 @@ namespace MPF.Core.Data try { if (Directory.Exists(Path.Combine(drivePath, "$SystemUpdate")) - && Directory.EnumerateFiles(Path.Combine(drivePath, "$SystemUpdate")).Any()) + && Directory.EnumerateFiles(Path.Combine(drivePath, "$SystemUpdate")).Any() + && this.TotalSize <= 500_000_000) { return RedumpSystem.MicrosoftXbox360; }