diff --git a/BurnOutSharp/ProtectionFind.cs b/BurnOutSharp/ProtectionFind.cs index 34f6bf84..dbf966a6 100644 --- a/BurnOutSharp/ProtectionFind.cs +++ b/BurnOutSharp/ProtectionFind.cs @@ -33,16 +33,6 @@ namespace BurnOutSharp /// private static IProgress FileProgress = null; - /// - /// Current file index - /// - private static int Index = 0; - - /// - /// Current file total - /// - private static int Total = 0; - /// /// Scan a path to find any known copy protection(s) /// @@ -69,9 +59,6 @@ namespace BurnOutSharp // If we have a file if (File.Exists(path)) { - // Set total - Total = 1; - // Get the reportable file name string reportableFileName = path; if (reportableFileName.StartsWith(tempFilePath)) @@ -105,9 +92,6 @@ namespace BurnOutSharp // Get the lists of files to be used var files = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories); - // Set total - Total = files.Count(); - // Try using just the path first to get protection info string pathProtection = ScanPath(path, true); if (!string.IsNullOrWhiteSpace(pathProtection)) @@ -116,9 +100,6 @@ namespace BurnOutSharp // Loop through all files and scan their contents for (int i = 0; i < files.Count(); i++) { - // Set index - Index = i; - // Get the current file string file = files.ElementAt(i); @@ -435,10 +416,6 @@ namespace BurnOutSharp // Files can be protected in multiple ways List protections = new List(); - // Cache current values - int tempIndex = Index; - int tempTotal = Total; - // 7-Zip archive if (SevenZip.ShouldScan(magic)) protections.AddRange(SevenZip.Scan(stream, includePosition)); @@ -495,10 +472,6 @@ namespace BurnOutSharp if (XZ.ShouldScan(magic)) protections.AddRange(XZ.Scan(stream, includePosition)); - // Reset values - Index = tempIndex; - Total = tempTotal; - // Return blank if nothing found, or comma-separated list of protections if (protections.Count() == 0) return string.Empty;