From 4a94c80ec16374911030ae053edec2afe92d159e Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 22 Sep 2025 08:58:43 -0400 Subject: [PATCH] Move constructor closer to use --- BinaryObjectScanner/Scanner.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BinaryObjectScanner/Scanner.cs b/BinaryObjectScanner/Scanner.cs index a1c0d49a..3d7839eb 100644 --- a/BinaryObjectScanner/Scanner.cs +++ b/BinaryObjectScanner/Scanner.cs @@ -297,9 +297,6 @@ namespace BinaryObjectScanner return []; } - // Initialize the protections found - var protections = new ProtectionDictionary(); - // Get the extension for certain checks string extension = Path.GetExtension(fileName).ToLower().TrimStart('.'); @@ -328,6 +325,9 @@ namespace BinaryObjectScanner // Get the wrapper, if possible var wrapper = WrapperFactory.CreateWrapper(fileType, stream); + // Initialize the protections found + var protections = new ProtectionDictionary(); + #region Non-Archive File Types // Try to scan file contents