mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 22:37:06 -04:00
Build Sonarr on Net6
Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
parent
f79ae77a3a
commit
878d1561aa
222 changed files with 3643 additions and 5311 deletions
|
@ -1,4 +1,4 @@
|
|||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Principal;
|
||||
using NUnit.Framework;
|
||||
|
@ -25,15 +25,17 @@ namespace NzbDrone.Windows.Test.DiskProviderTests
|
|||
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
var ds = Directory.GetAccessControl(path);
|
||||
var directory = new DirectoryInfo(path);
|
||||
var ds = directory.GetAccessControl();
|
||||
ds.SetAccessRule(new FileSystemAccessRule(owner, FileSystemRights.Write, accessControlType));
|
||||
Directory.SetAccessControl(path, ds);
|
||||
directory.SetAccessControl(ds);
|
||||
}
|
||||
else
|
||||
{
|
||||
var fs = File.GetAccessControl(path);
|
||||
var file = new FileInfo(path);
|
||||
var fs = file.GetAccessControl();
|
||||
fs.SetAccessRule(new FileSystemAccessRule(owner, FileSystemRights.Write, accessControlType));
|
||||
File.SetAccessControl(path, fs);
|
||||
file.SetAccessControl(fs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,9 @@ namespace NzbDrone.Windows.Test.DiskProviderTests
|
|||
for (char driveletter = 'Z'; driveletter > 'D'; driveletter--)
|
||||
{
|
||||
if (new DriveInfo(driveletter.ToString()).IsReady)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST"));
|
||||
return;
|
||||
|
|
|
@ -6,7 +6,7 @@ using NzbDrone.Test.Common;
|
|||
namespace NzbDrone.Windows.Test.EnvironmentInfo
|
||||
{
|
||||
[TestFixture]
|
||||
[Platform("Win")]
|
||||
[Platform("Net")]
|
||||
public class DotNetPlatformInfoFixture : TestBase<PlatformInfo>
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net462</TargetFramework>
|
||||
<Platforms>x86</Platforms>
|
||||
<TargetFrameworks>net6.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NzbDrone.Common.Test\Sonarr.Common.Test.csproj" />
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
</configuration>
|
Loading…
Add table
Add a link
Reference in a new issue