peteraritchie / LongPath

drop-in library to support long paths in .NET
GNU Lesser General Public License v3.0
112 stars 43 forks source link

remove acl #42

Open nathansantanna opened 8 years ago

nathansantanna commented 8 years ago

But now, i'm having some problems on

Directory.SetAccessControl(string Path, DirectorySecurity directorySecurity ) File.SetAccessControl(string Path, FileSecurity fileSecurity )

doesn't removes the rule on my folder or file, with System.IO works fine.

Here's how i'm using. public void RemoveFileSecurity(FileSystemAccessRule rule) { FileSecurity fileSecurity = File.GetAccessControl(Path); fileSecurity.RemoveAccessRule(rule); System.IO.File.SetAccessControl(Path, fileSecurity); }

thanks in advance!