From 5d515c7ddd3373f98b18b3d1bb1efbb0c5304791 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 1 Jun 2022 11:34:50 -0700 Subject: [PATCH] Update LibMSPackSharp --- BurnOutSharp/FileType/MicrosoftCAB.cs | 19 +++---------------- LibMSPackSharp | 2 +- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/BurnOutSharp/FileType/MicrosoftCAB.cs b/BurnOutSharp/FileType/MicrosoftCAB.cs index 6b93e580..6ebf8561 100644 --- a/BurnOutSharp/FileType/MicrosoftCAB.cs +++ b/BurnOutSharp/FileType/MicrosoftCAB.cs @@ -4,6 +4,7 @@ using System.IO; using BurnOutSharp.Interfaces; using BurnOutSharp.Tools; using LibMSPackSharp; +using LibMSPackSharp.CABExtract; namespace BurnOutSharp.FileType { @@ -61,22 +62,8 @@ namespace BurnOutSharp.FileType } // If there are additional next CABs, add those - var cabFile1 = cabFile; - while (!string.IsNullOrWhiteSpace(cabFile1?.NextName)) - { - var cabFile2 = decompressor.Open(Path.Combine(directory, cabFile1.PreviousName)); - Error error = decompressor.Append(cabFile1, cabFile2); - if (error != Error.MSPACK_ERR_OK) - { - if (scanner.IncludeDebug) Console.WriteLine($"Error occurred appending '{cabFile2.Filename}' to '{cabFile1.Filename}': {error}"); - - decompressor.FixMSZip = true; - decompressor.Salvage = true; - break; - } - - cabFile1 = cabFile2; - } + string fileName = Path.GetFileName(file); + CABExtract.LoadSpanningCabinets(cabFile, fileName); // Loop through the found internal files var sub = cabFile.Files; diff --git a/LibMSPackSharp b/LibMSPackSharp index 3358c437..7822afe4 160000 --- a/LibMSPackSharp +++ b/LibMSPackSharp @@ -1 +1 @@ -Subproject commit 3358c437ae84fa4b2d9f1f7f3a5467c025ccd638 +Subproject commit 7822afe46f4e53335d694ba103d12723e93832fb