diff --git a/BinaryObjectScanner/Scanner.cs b/BinaryObjectScanner/Scanner.cs index f76a3c51..cc950298 100644 --- a/BinaryObjectScanner/Scanner.cs +++ b/BinaryObjectScanner/Scanner.cs @@ -347,10 +347,12 @@ namespace BinaryObjectScanner } // Prepare the returned protections - subProtections?.StripFromKeys(tempPath); - subProtections?.PrependToKeys(fileName); if (subProtections != null) + { + subProtections.StripFromKeys(tempPath); + subProtections.PrependToKeys(fileName); protections.Append(subProtections); + } } catch (Exception ex) {