mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 12:33:00 +02:00
Added InheritFolderPermissions to DiskProvider.
DiskScanProvider.MoveEpisode will now set the moved file to inherit the parent folder permissions.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user