mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-24 15:54:57 +00:00
Make helper method easier to read
This commit is contained in:
@@ -189,13 +189,15 @@ namespace BurnOutSharp.FileType
|
||||
/// <param name="protection">The protection result to be checked</param>
|
||||
private bool ShouldAddProtection(object checkClass, bool scanPackers, string protection)
|
||||
{
|
||||
// If we have an invalid protection
|
||||
if (string.IsNullOrWhiteSpace(protection))
|
||||
return false;
|
||||
|
||||
// If we have a valid content check based on settings
|
||||
if (scanPackers || !checkClass.GetType().Namespace.ToLowerInvariant().Contains("packertype"))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(protection))
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
// Everything else fails
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user