mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
guard against InheritFolderPermissionsNotImplementedException in linux.
This commit is contained in:
parent
f8afed195a
commit
873134fcee
@ -271,10 +271,20 @@ public void InheritFolderPermissions(string filename)
|
|||||||
{
|
{
|
||||||
Ensure.That(() => filename).IsValidPath();
|
Ensure.That(() => filename).IsValidPath();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
var fs = File.GetAccessControl(filename);
|
var fs = File.GetAccessControl(filename);
|
||||||
fs.SetAccessRuleProtection(false, false);
|
fs.SetAccessRuleProtection(false, false);
|
||||||
File.SetAccessControl(filename, fs);
|
File.SetAccessControl(filename, fs);
|
||||||
}
|
}
|
||||||
|
catch (NotImplementedException)
|
||||||
|
{
|
||||||
|
if (!OsInfo.IsLinux)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public long? GetAvailableSpace(string path)
|
public long? GetAvailableSpace(string path)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user