mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
Added InheritFolderPermissions to DiskProvider.
DiskScanProvider.MoveEpisode will now set the moved file to inherit the parent folder permissions.
This commit is contained in:
parent
b695a4433e
commit
c534d47b0a
3 changed files with 10 additions and 228 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue