From 5f5abf8a14e9f139c8d24faca02754dfc8056f02 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 28 Oct 2020 12:22:29 -0700 Subject: [PATCH] Scan whole path for Valve --- BurnOutSharp/FileType/Valve.cs | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/BurnOutSharp/FileType/Valve.cs b/BurnOutSharp/FileType/Valve.cs index 79b2209b..388067b4 100644 --- a/BurnOutSharp/FileType/Valve.cs +++ b/BurnOutSharp/FileType/Valve.cs @@ -52,25 +52,9 @@ namespace BurnOutSharp.FileType HLExtractProgram.Process(args); - if (Directory.Exists(tempPath)) - { - foreach (string tempFile in Directory.EnumerateFiles(tempPath, "*", SearchOption.AllDirectories)) - { - // 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(tempFile); - } - } + // 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