Skip to content

Commit f2f0d0f

Browse files
committed
Try to fix self-referencing MS-CAB
1 parent f7fd2f6 commit f2f0d0f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

SabreTools.Serialization/Extensions/ISO9660.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static bool BlockSizeValid(short blockSize, short sectorLength)
5555
/// <summary>
5656
/// Indicates if an array contains all ASCII numeric digits
5757
/// </summary>
58-
/// TODO: Move to IO as an array extension
58+
/// TODO: Remove when IO is updated
5959
public static bool IsNumericArray(this byte[] arr)
6060
=> Array.TrueForAll(arr, b => b >= 0x30 && b <= 0x39);
6161
}

SabreTools.Serialization/Wrappers/MicrosoftCabinet.Extraction.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ public partial class MicrosoftCabinet : IExtractable
6565
// Read in the cabinet parts sequentially
6666
while (current.CabinetNext != null)
6767
{
68+
// If the current and next filenames match
69+
if (Path.GetFileName(filename) == current.CabinetNext)
70+
break;
71+
6872
// Open the next cabinet and try to parse
6973
var next = current.OpenNext(filename);
7074
if (next?.Header == null)

0 commit comments

Comments
 (0)