Scan whole folder for ISCab

This commit is contained in:
Matt Nadareski
2020-10-28 12:19:10 -07:00
parent 9be19d6925
commit 79c706e35a

View File

@@ -49,26 +49,15 @@ namespace BurnOutSharp.FileType
try
{
string tempFile = Path.Combine(tempPath, cabfile.FileName(i));
if (cabfile.FileSave(i, 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{cabfile.FileName(i)} - {protection}");
}
cabfile.FileSave(i, tempFile);
}
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
{