From 4a6e2fd62d08ef28ea16485697290bae793c4d9a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 28 Oct 2020 12:20:07 -0700 Subject: [PATCH] Scan whole folder for MSCab --- BurnOutSharp/FileType/MicrosoftCAB.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/BurnOutSharp/FileType/MicrosoftCAB.cs b/BurnOutSharp/FileType/MicrosoftCAB.cs index f44d2edb..5c1f213a 100644 --- a/BurnOutSharp/FileType/MicrosoftCAB.cs +++ b/BurnOutSharp/FileType/MicrosoftCAB.cs @@ -36,24 +36,14 @@ namespace BurnOutSharp.FileType { string tempFile = Path.Combine(tempPath, sub.Filename); sub.ExtractTo(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{sub.Filename} - {protection}"); } 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 {