From 36c858fac14ac9a96912069ec0ae3ff7b847e212 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 20 Sep 2025 16:23:04 -0400 Subject: [PATCH] A couple more debug places to avoid confusion --- BinaryObjectScanner/Scanner.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BinaryObjectScanner/Scanner.cs b/BinaryObjectScanner/Scanner.cs index 9b9e81be..f57dc70e 100644 --- a/BinaryObjectScanner/Scanner.cs +++ b/BinaryObjectScanner/Scanner.cs @@ -111,7 +111,10 @@ namespace BinaryObjectScanner { // If we have no paths, we can't scan if (paths == null || paths.Count == 0) + { + if (_includeDebug) Console.WriteLine("No paths found to scan, skipping..."); return []; + } // Set a starting starting time for debug output DateTime startTime = DateTime.UtcNow; @@ -209,10 +212,10 @@ namespace BinaryObjectScanner _fileProgress?.Report(new ProtectionProgress(reportableFileName, depth, 1, fullProtection ?? string.Empty)); } - // Throw on an invalid path + // Invalid path else { - Console.WriteLine($"{path} is not a directory or file, skipping..."); + if (_includeDebug) Console.Error.WriteLine($"{path} is not a directory or file, skipping..."); //throw new FileNotFoundException($"{path} is not a directory or file, skipping..."); } } @@ -237,7 +240,10 @@ namespace BinaryObjectScanner { // Quick sanity check before continuing if (!File.Exists(file)) + { + if (_includeDebug) Console.WriteLine($"{file} does not exist, skipping..."); return []; + } // Open the file and begin scanning try