|
|
@ -271,10 +271,20 @@ namespace NzbDrone.Common
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
{
|
|
|
|