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