diff --git a/BinaryObjectScanner/FileType/PKZIP.cs b/BinaryObjectScanner/FileType/PKZIP.cs index c23e4916..5e1eae4f 100644 --- a/BinaryObjectScanner/FileType/PKZIP.cs +++ b/BinaryObjectScanner/FileType/PKZIP.cs @@ -47,13 +47,16 @@ namespace BinaryObjectScanner.FileType // If the file exists if (!string.IsNullOrEmpty(file) && File.Exists(file!)) { + // Find all file parts + var parts = ArchiveFactory.GetFileParts(new FileInfo(file)); + // Try to read the file path if no entries are found if (zipFile.Entries.Count == 0) - zipFile = ZipArchive.Open(file!, readerOptions); + zipFile = ZipArchive.Open(parts, readerOptions); // If there's any multipart items, try reading the file as well else if (!zipFile.IsComplete) - zipFile = ZipArchive.Open(file!, readerOptions); + zipFile = ZipArchive.Open(parts, readerOptions); } foreach (var entry in zipFile.Entries) diff --git a/BinaryObjectScanner/FileType/RAR.cs b/BinaryObjectScanner/FileType/RAR.cs index 29bb8257..4c98f258 100644 --- a/BinaryObjectScanner/FileType/RAR.cs +++ b/BinaryObjectScanner/FileType/RAR.cs @@ -48,13 +48,16 @@ namespace BinaryObjectScanner.FileType // If the file exists if (!string.IsNullOrEmpty(file) && File.Exists(file!)) { + // Find all file parts + var parts = ArchiveFactory.GetFileParts(new FileInfo(file)); + // Try to read the file path if no entries are found if (rarFile.Entries.Count == 0) - rarFile = RarArchive.Open(file!, readerOptions); + rarFile = RarArchive.Open(parts, readerOptions); // If there's any multipart items, try reading the file as well else if (!rarFile.IsComplete) - rarFile = RarArchive.Open(file!, readerOptions); + rarFile = RarArchive.Open(parts, readerOptions); } if (rarFile.IsSolid) diff --git a/BinaryObjectScanner/FileType/SevenZip.cs b/BinaryObjectScanner/FileType/SevenZip.cs index 3a0dfcdd..0bd7cacd 100644 --- a/BinaryObjectScanner/FileType/SevenZip.cs +++ b/BinaryObjectScanner/FileType/SevenZip.cs @@ -48,13 +48,16 @@ namespace BinaryObjectScanner.FileType // If the file exists if (!string.IsNullOrEmpty(file) && File.Exists(file!)) { + // Find all file parts + var parts = ArchiveFactory.GetFileParts(new FileInfo(file)); + // Try to read the file path if no entries are found if (sevenZip.Entries.Count == 0) - sevenZip = SevenZipArchive.Open(file!, readerOptions); + sevenZip = SevenZipArchive.Open(parts, readerOptions); // If there's any multipart items, try reading the file as well else if (!sevenZip.IsComplete) - sevenZip = SevenZipArchive.Open(file!, readerOptions); + sevenZip = SevenZipArchive.Open(parts, readerOptions); } // Currently doesn't flag solid 7z archives with only 1 solid block as solid, but practically speaking