File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -287,15 +287,17 @@ private ProtectionDictionary GetInternalProtections(string fileName, Stream stre
287287 }
288288 catch ( Exception ex )
289289 {
290- if ( _includeDebug ) Console . WriteLine ( ex ) ;
291-
290+ if ( _includeDebug ) Console . Error . WriteLine ( ex ) ;
292291 return [ ] ;
293292 }
294293
295294 // Get the file type either from magic number or extension
296295 WrapperType fileType = WrapperFactory . GetFileType ( magic , extension ) ;
297296 if ( fileType == WrapperType . UNKNOWN )
297+ {
298+ if ( _includeDebug ) Console . WriteLine ( $ "{ fileName } not a scannable file type, skipping...") ;
298299 return [ ] ;
300+ }
299301
300302 // Get the wrapper, if possible
301303 var wrapper = WrapperFactory . CreateWrapper ( fileType , stream ) ;
@@ -338,7 +340,7 @@ private ProtectionDictionary GetInternalProtections(string fileName, Stream stre
338340 }
339341 catch ( Exception ex )
340342 {
341- if ( _includeDebug ) Console . WriteLine ( ex ) ;
343+ if ( _includeDebug ) Console . Error . WriteLine ( ex ) ;
342344 }
343345
344346 // Prepare the returned protections
@@ -349,7 +351,7 @@ private ProtectionDictionary GetInternalProtections(string fileName, Stream stre
349351 }
350352 catch ( Exception ex )
351353 {
352- if ( _includeDebug ) Console . WriteLine ( ex ) ;
354+ if ( _includeDebug ) Console . Error . WriteLine ( ex ) ;
353355 }
354356 }
355357
You can’t perform that action at this time.
0 commit comments