Scan whole path for Valve

This commit is contained in:
Matt Nadareski
2020-10-28 12:22:29 -07:00
parent 406791b938
commit 5f5abf8a14

View File

@@ -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