From eb2e6e7029ca6c53195333c6530f17b1999d2eb2 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 28 Oct 2020 12:21:44 -0700 Subject: [PATCH] Scan whole path for 7zip --- BurnOutSharp/FileType/SevenZip.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/BurnOutSharp/FileType/SevenZip.cs b/BurnOutSharp/FileType/SevenZip.cs index 252c8de9..f231f7b3 100644 --- a/BurnOutSharp/FileType/SevenZip.cs +++ b/BurnOutSharp/FileType/SevenZip.cs @@ -40,24 +40,14 @@ namespace BurnOutSharp.FileType string tempFile = Path.Combine(tempPath, entry.Key); entry.WriteToFile(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{entry.Key} - {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 {