From 9f0b41c6aa75c15abf4ac9b6a3da190fff80e06b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 28 Oct 2020 12:21:26 -0700 Subject: [PATCH] Scan whole path for RAR --- BurnOutSharp/FileType/RAR.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/BurnOutSharp/FileType/RAR.cs b/BurnOutSharp/FileType/RAR.cs index 61de179f..bc249405 100644 --- a/BurnOutSharp/FileType/RAR.cs +++ b/BurnOutSharp/FileType/RAR.cs @@ -45,24 +45,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 {