From 79c706e35ae1bd60ab391695072039dc0e9555a7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 28 Oct 2020 12:19:10 -0700 Subject: [PATCH] Scan whole folder for ISCab --- BurnOutSharp/FileType/InstallShieldCAB.cs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/BurnOutSharp/FileType/InstallShieldCAB.cs b/BurnOutSharp/FileType/InstallShieldCAB.cs index 21e4cb7b..c7e588c3 100644 --- a/BurnOutSharp/FileType/InstallShieldCAB.cs +++ b/BurnOutSharp/FileType/InstallShieldCAB.cs @@ -49,26 +49,15 @@ namespace BurnOutSharp.FileType try { string tempFile = Path.Combine(tempPath, cabfile.FileName(i)); - if (cabfile.FileSave(i, tempFile)) - { - // Collect and format all found protections - var fileProtections = ProtectionFind.Scan(tempFile, includePosition); - string protection = string.Join("\r\n", fileProtections.Select(kvp => kvp.Key + ": " + kvp.Value.TrimEnd())); - - // If tempfile cleanup fails - try - { - File.Delete(tempFile); - } - catch { } - - if (!string.IsNullOrEmpty(protection)) - protections.Add($"\r\n{cabfile.FileName(i)} - {protection}"); - } + cabfile.FileSave(i, tempFile); } catch { } } + // Collect and format all found protections + var fileProtections = ProtectionFind.Scan(tempPath, includePosition); + protections = fileProtections.Select(kvp => kvp.Key + ": " + kvp.Value.TrimEnd()).ToList(); + // If temp directory cleanup fails try {