Browse Source

Minor fixes

tags/4.2.4
Raimund Andée 7 years ago
parent
commit
53483e593a
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      Security2/Enums.cs
  2. +1
    -1
      Security2/FileSystem/FileSystemAccessRule2 Class/FileSystemAccessRule2.GetFileSystemAccessRules.cs

+ 1
- 0
Security2/Enums.cs View File

@@ -28,6 +28,7 @@ namespace Security2
None = 0,
ListDirectory = 1,
ReadData = 1,
WriteData = 2,
CreateFiles = 2,
CreateDirectories = 4,
AppendData = 4,


+ 1
- 1
Security2/FileSystem/FileSystemAccessRule2 Class/FileSystemAccessRule2.GetFileSystemAccessRules.cs View File

@@ -32,7 +32,7 @@ namespace Security2
foreach (FileSystemAccessRule ace in acl)
{
var ace2 = new FileSystemAccessRule2(ace) { FullName = sd.Item.FullName, InheritanceEnabled = !sd.SecurityDescriptor.AreAccessRulesProtected };
if (getInheritedFrom)
if (getInheritedFrom && inheritedFrom.Count > 0)
{
ace2.inheritedFrom = string.IsNullOrEmpty(inheritedFrom[aceCounter]) ? "" : inheritedFrom[aceCounter].Substring(0, inheritedFrom[aceCounter].Length - 1);
aceCounter++;


Loading…
Cancel
Save