Added InheritFolderPermissions to DiskProvider.

DiskScanProvider.MoveEpisode will now set the moved file to inherit the parent folder permissions.
This commit is contained in:
Mark McDowall
2011-10-10 21:00:31 -07:00
parent b695a4433e
commit c534d47b0a
3 changed files with 10 additions and 228 deletions

View File

@@ -73,5 +73,12 @@ namespace NzbDrone.Core.Providers.Core
{
Directory.Move(source, destination);
}
public virtual void InheritFolderPermissions(string filename)
{
var fs = File.GetAccessControl(filename);
fs.SetAccessRuleProtection(false, false);
File.SetAccessControl(filename, fs);
}
}
}