Make helper method easier to read

This commit is contained in:
Matt Nadareski
2022-05-01 14:28:28 -07:00
parent e930be12c8
commit 7883638f0a

View File

@@ -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;
}