CheckPath should not call CheckContents

This commit is contained in:
Matt Nadareski
2020-02-20 14:28:26 -08:00
parent c78229c3cd
commit 0bc1d1efa6
3 changed files with 3 additions and 36 deletions

View File

@@ -1,12 +1,8 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace BurnOutSharp.ProtectionType
namespace BurnOutSharp.ProtectionType
{
public class PSXAntiModchip
{
// TODO: Figure out PSX binary header so this can be checked explicitly
public static string CheckContents(string file, string fileContent)
{
// TODO: Detect Red Hand protection
@@ -18,30 +14,5 @@ namespace BurnOutSharp.ProtectionType
return null;
}
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
{
if (isDirectory)
{
if (files.Where(s => s.ToLowerInvariant().EndsWith(".cnf")).Count() > 0)
{
foreach (string file in files)
{
// Load the current file content
string fileContent = null;
using (StreamReader sr = new StreamReader(file, Encoding.Default))
{
fileContent = sr.ReadToEnd();
}
string protection = CheckContents(path, fileContent);
if (!string.IsNullOrWhiteSpace(protection))
return protection;
}
}
}
return null;
}
}
}