mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-01 06:18:16 +00:00
guard against InheritFolderPermissionsNotImplementedException in linux.
This commit is contained in:
@@ -271,9 +271,19 @@ namespace NzbDrone.Common
|
||||
{
|
||||
Ensure.That(() => filename).IsValidPath();
|
||||
|
||||
var fs = File.GetAccessControl(filename);
|
||||
fs.SetAccessRuleProtection(false, false);
|
||||
File.SetAccessControl(filename, fs);
|
||||
try
|
||||
{
|
||||
var fs = File.GetAccessControl(filename);
|
||||
fs.SetAccessRuleProtection(false, false);
|
||||
File.SetAccessControl(filename, fs);
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{
|
||||
if (!OsInfo.IsLinux)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public long? GetAvailableSpace(string path)
|
||||
|
||||
Reference in New Issue
Block a user