Remove useless all files flag

This commit is contained in:
Matt Nadareski
2022-05-01 13:58:43 -07:00
parent 9a160b3127
commit ee85f2f6f0
2 changed files with 3 additions and 19 deletions

View File

@@ -22,15 +22,6 @@ namespace BurnOutSharp
/// </summary>
public bool IncludeDebug { get; set; } = false;
/// <summary>
/// Determines whether all files are scanned or just executables are
/// </summary>
/// <remarks>
/// With the improvements to executable scannning, this should probably be removed in
/// a future update.
/// </remarks>
public bool ScanAllFiles { get; set; } = false;
/// <summary>
/// Determines whether archives are decompressed and scanned
/// </summary>
@@ -281,14 +272,14 @@ namespace BurnOutSharp
#region Non-Archive File Types
// Executable
if (ScanAllFiles || new Executable().ShouldScan(magic))
if (new Executable().ShouldScan(magic))
{
var subProtections = new Executable().Scan(this, fs, file);
Utilities.AppendToDictionary(protections, subProtections);
}
// Text-based files
if (ScanAllFiles || new Textfile().ShouldScan(magic, extension))
if (new Textfile().ShouldScan(magic, extension))
{
var subProtections = new Textfile().Scan(this, fs, file);
Utilities.AppendToDictionary(protections, subProtections);

View File

@@ -16,7 +16,7 @@ namespace Test
p.ProgressChanged += Changed;
// Set initial values for scanner flags
bool debug = false, allFiles = false, archives = true, packers = true;
bool debug = false, archives = true, packers = true;
var inputPaths = new List<string>();
// Loop through the arguments to get the flags
@@ -37,11 +37,6 @@ namespace Test
debug = true;
break;
case "-a":
case "--all-files":
allFiles = true;
break;
case "-na":
case "--no-archives":
archives = false;
@@ -71,7 +66,6 @@ namespace Test
var scanner = new Scanner(p)
{
IncludeDebug = debug,
ScanAllFiles = allFiles,
ScanArchives = archives,
ScanPackers = packers,
};
@@ -98,7 +92,6 @@ namespace Test
Console.WriteLine("Possible options:");
Console.WriteLine("-?, -h, --help Display this help text and quit");
Console.WriteLine("-d, --debug Enable debug mode");
Console.WriteLine("-a, --all-files Force scanning all files");
Console.WriteLine("-na, --no-archives Disable scanning archives");
Console.WriteLine("-np, --no-packers Disable scanning for packers");
}