mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-07-08 18:06:41 +00:00
Try to fix self-referencing MS-CAB
This commit is contained in:
@@ -55,7 +55,7 @@ namespace SabreTools.Data.Extensions
|
||||
/// <summary>
|
||||
/// Indicates if an array contains all ASCII numeric digits
|
||||
/// </summary>
|
||||
/// TODO: Move to IO as an array extension
|
||||
/// TODO: Remove when IO is updated
|
||||
public static bool IsNumericArray(this byte[] arr)
|
||||
=> Array.TrueForAll(arr, b => b >= 0x30 && b <= 0x39);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,10 @@ namespace SabreTools.Serialization.Wrappers
|
||||
// Read in the cabinet parts sequentially
|
||||
while (current.CabinetNext != null)
|
||||
{
|
||||
// If the current and next filenames match
|
||||
if (Path.GetFileName(filename) == current.CabinetNext)
|
||||
break;
|
||||
|
||||
// Open the next cabinet and try to parse
|
||||
var next = current.OpenNext(filename);
|
||||
if (next?.Header == null)
|
||||
|
||||
Reference in New Issue
Block a user