diff --git a/frontend/src/System/Status/About/About.js b/frontend/src/System/Status/About/About.js
index b8dcacafa..4635fef68 100644
--- a/frontend/src/System/Status/About/About.js
+++ b/frontend/src/System/Status/About/About.js
@@ -20,7 +20,6 @@ class About extends Component {
packageVersion,
packageAuthor,
isNetCore,
- isMono,
isDocker,
runtimeVersion,
migrationVersion,
@@ -50,14 +49,6 @@ class About extends Component {
/>
}
- {
- isMono &&
-
- }
-
{
isNetCore &&
(() => Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Copy));
}
- [Test]
- public void CopyFolder_should_not_copy_casesensitive_folder()
- {
- MonoOnly();
-
- WithRealDiskProvider();
-
- var original = GetFilledTempFolder();
- var root = new DirectoryInfo(GetTempFilePath());
- var source = new DirectoryInfo(root.FullName + "A/series");
- var destination = new DirectoryInfo(root.FullName + "A/Series");
-
- Subject.TransferFolder(original.FullName, source.FullName, TransferMode.Copy);
-
- // Note: Although technically possible top copy to different case, we're not allowing it
- Assert.Throws(() => Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Copy));
- }
-
[Test]
public void CopyFolder_should_ignore_nfs_temp_file()
{
@@ -540,26 +522,6 @@ namespace NzbDrone.Common.Test.DiskTests
source.FullName.GetActualCasing().Should().Be(destination.FullName);
}
- [Test]
- public void MoveFolder_should_rename_casesensitive_folder()
- {
- MonoOnly();
-
- WithRealDiskProvider();
-
- var original = GetFilledTempFolder();
- var root = new DirectoryInfo(GetTempFilePath());
- var source = new DirectoryInfo(root.FullName + "A/series");
- var destination = new DirectoryInfo(root.FullName + "A/Series");
-
- Subject.TransferFolder(original.FullName, source.FullName, TransferMode.Copy);
-
- Subject.TransferFolder(source.FullName, destination.FullName, TransferMode.Move);
-
- Directory.Exists(source.FullName).Should().Be(false);
- Directory.Exists(destination.FullName).Should().Be(true);
- }
-
[Test]
public void should_throw_if_destination_is_readonly()
{
diff --git a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs
index 2240966a7..8d1250dd7 100644
--- a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs
+++ b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs
@@ -307,11 +307,6 @@ namespace NzbDrone.Common.Test.Http
[Test]
public void should_follow_redirects_to_https()
{
- if (typeof(TDispatcher) == typeof(ManagedHttpDispatcher) && PlatformInfo.IsMono)
- {
- Assert.Ignore("Will fail on tls1.2 via managed dispatcher, ignore.");
- }
-
var request = new HttpRequestBuilder($"https://{_httpBinHost}/redirect-to")
.AddQueryParam("url", $"https://readarr.com/")
.Build();
diff --git a/src/NzbDrone.Common.Test/PathExtensionFixture.cs b/src/NzbDrone.Common.Test/PathExtensionFixture.cs
index 144094c26..69a0417fe 100644
--- a/src/NzbDrone.Common.Test/PathExtensionFixture.cs
+++ b/src/NzbDrone.Common.Test/PathExtensionFixture.cs
@@ -279,7 +279,7 @@ namespace NzbDrone.Common.Test
[Test]
public void GetUpdateClientExePath()
{
- GetIAppDirectoryInfo().GetUpdateClientExePath(PlatformType.DotNet).Should().BeEquivalentTo(@"C:\Temp\readarr_update\Readarr.Update.exe".AsOsAgnostic());
+ GetIAppDirectoryInfo().GetUpdateClientExePath().Should().BeEquivalentTo(@"C:\Temp\readarr_update\Readarr.Update".AsOsAgnostic().ProcessNameToExe());
}
[Test]
diff --git a/src/NzbDrone.Common.Test/ProcessProviderFixture.cs b/src/NzbDrone.Common.Test/ProcessProviderFixture.cs
index c50af046d..00e7e5984 100644
--- a/src/NzbDrone.Common.Test/ProcessProviderFixture.cs
+++ b/src/NzbDrone.Common.Test/ProcessProviderFixture.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
@@ -171,7 +171,7 @@ namespace NzbDrone.Common.Test
var processStarted = new ManualResetEventSlim();
string suffix;
- if (OsInfo.IsWindows || PlatformInfo.IsMono)
+ if (OsInfo.IsWindows)
{
suffix = ".exe";
}
diff --git a/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs
index 5c28231fe..68a0ca092 100644
--- a/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs
+++ b/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs
@@ -1,17 +1,7 @@
-using System;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using Microsoft.Win32;
+using System;
namespace NzbDrone.Common.EnvironmentInfo
{
- public enum PlatformType
- {
- DotNet = 0,
- Mono = 1,
- NetCore = 2
- }
-
public interface IPlatformInfo
{
Version Version { get; }
@@ -19,38 +9,18 @@ namespace NzbDrone.Common.EnvironmentInfo
public class PlatformInfo : IPlatformInfo
{
- private static readonly Regex MonoVersionRegex = new Regex(@"(?<=\W|^)(?\d+\.\d+(\.\d+)?(\.\d+)?)(?=\W)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
- private static PlatformType _platform;
private static Version _version;
static PlatformInfo()
{
- _platform = PlatformType.NetCore;
_version = Environment.Version;
}
- public static PlatformType Platform => _platform;
- public static bool IsMono => Platform == PlatformType.Mono;
- public static bool IsDotNet => Platform == PlatformType.DotNet;
- public static bool IsNetCore => Platform == PlatformType.NetCore;
-
public static string PlatformName
{
get
{
- if (IsDotNet)
- {
- return ".NET";
- }
- else if (IsMono)
- {
- return "Mono";
- }
- else
- {
- return ".NET Core";
- }
+ return ".NET";
}
}
@@ -60,107 +30,5 @@ namespace NzbDrone.Common.EnvironmentInfo
{
return _version;
}
-
- private static Version GetMonoVersion()
- {
- try
- {
- var type = Type.GetType("Mono.Runtime");
-
- if (type != null)
- {
- var displayNameMethod = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
- if (displayNameMethod != null)
- {
- var displayName = displayNameMethod.Invoke(null, null).ToString();
- var versionMatch = MonoVersionRegex.Match(displayName);
-
- if (versionMatch.Success)
- {
- return new Version(versionMatch.Groups["version"].Value);
- }
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine("Couldnt get Mono version: " + ex.ToString());
- }
-
- return new Version();
- }
-
- private static Version GetDotNetVersion()
- {
- try
- {
- const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";
- using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(subkey))
- {
- if (ndpKey == null)
- {
- return new Version(4, 0);
- }
-
- var releaseKey = (int)ndpKey.GetValue("Release");
-
- if (releaseKey >= 528040)
- {
- return new Version(4, 8, 0);
- }
-
- if (releaseKey >= 461808)
- {
- return new Version(4, 7, 2);
- }
-
- if (releaseKey >= 461308)
- {
- return new Version(4, 7, 1);
- }
-
- if (releaseKey >= 460798)
- {
- return new Version(4, 7);
- }
-
- if (releaseKey >= 394802)
- {
- return new Version(4, 6, 2);
- }
-
- if (releaseKey >= 394254)
- {
- return new Version(4, 6, 1);
- }
-
- if (releaseKey >= 393295)
- {
- return new Version(4, 6);
- }
-
- if (releaseKey >= 379893)
- {
- return new Version(4, 5, 2);
- }
-
- if (releaseKey >= 378675)
- {
- return new Version(4, 5, 1);
- }
-
- if (releaseKey >= 378389)
- {
- return new Version(4, 5);
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine("Couldnt get .NET framework version: " + ex.ToString());
- }
-
- return new Version(4, 0);
- }
}
}
diff --git a/src/NzbDrone.Common/Extensions/PathExtensions.cs b/src/NzbDrone.Common/Extensions/PathExtensions.cs
index aa0725128..dc4b4005a 100644
--- a/src/NzbDrone.Common/Extensions/PathExtensions.cs
+++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs
@@ -240,9 +240,9 @@ namespace NzbDrone.Common.Extensions
return null;
}
- public static string ProcessNameToExe(this string processName, PlatformType runtime)
+ public static string ProcessNameToExe(this string processName)
{
- if (OsInfo.IsWindows || runtime != PlatformType.NetCore)
+ if (OsInfo.IsWindows)
{
processName += ".exe";
}
@@ -250,11 +250,6 @@ namespace NzbDrone.Common.Extensions
return processName;
}
- public static string ProcessNameToExe(this string processName)
- {
- return processName.ProcessNameToExe(PlatformInfo.Platform);
- }
-
public static string GetLongestCommonPath(this List paths)
{
var firstPath = paths.First();
@@ -347,9 +342,9 @@ namespace NzbDrone.Common.Extensions
return Path.Combine(GetUpdatePackageFolder(appFolderInfo), UPDATE_CLIENT_FOLDER_NAME);
}
- public static string GetUpdateClientExePath(this IAppFolderInfo appFolderInfo, PlatformType runtime)
+ public static string GetUpdateClientExePath(this IAppFolderInfo appFolderInfo)
{
- return Path.Combine(GetUpdateSandboxFolder(appFolderInfo), UPDATE_CLIENT_EXE_NAME).ProcessNameToExe(runtime);
+ return Path.Combine(GetUpdateSandboxFolder(appFolderInfo), UPDATE_CLIENT_EXE_NAME).ProcessNameToExe();
}
public static string GetDatabase(this IAppFolderInfo appFolderInfo)
diff --git a/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs b/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs
index 6f778d7de..50ede78a5 100644
--- a/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs
+++ b/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs
@@ -38,16 +38,6 @@ namespace NzbDrone.Common.Instrumentation
return;
}
- if (PlatformInfo.IsMono)
- {
- if ((exception is TypeInitializationException && exception.InnerException is DllNotFoundException) ||
- exception is DllNotFoundException)
- {
- Logger.Debug(exception, "Minor Fail: " + exception.Message);
- return;
- }
- }
-
Console.WriteLine("EPIC FAIL: {0}", exception);
Logger.Fatal(exception, "EPIC FAIL.");
}
diff --git a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs
index 1087a454c..2c5e4eb71 100644
--- a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs
+++ b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs
@@ -109,13 +109,6 @@ namespace NzbDrone.Common.Instrumentation.Sentry
o.Debug = false;
o.DiagnosticLevel = SentryLevel.Debug;
o.Release = BuildInfo.Release;
- if (PlatformInfo.IsMono)
- {
- // Mono 6.0 broke GzipStream.WriteAsync
- // TODO: Check specific version
- o.RequestBodyCompressionLevel = System.IO.Compression.CompressionLevel.NoCompression;
- }
-
o.BeforeSend = x => SentryCleanser.CleanseEvent(x);
o.BeforeBreadcrumb = x => SentryCleanser.CleanseBreadcrumb(x);
o.Environment = BuildInfo.Branch;
@@ -158,14 +151,6 @@ namespace NzbDrone.Common.Instrumentation.Sentry
SentrySdk.ConfigureScope(scope =>
{
scope.SetTag("is_docker", $"{osInfo.IsDocker}");
-
- if (osInfo.Name != null && PlatformInfo.IsMono)
- {
- // Sentry auto-detection of non-Windows platforms isn't that accurate on certain devices.
- scope.Contexts.OperatingSystem.Name = osInfo.Name.FirstCharToUpper();
- scope.Contexts.OperatingSystem.RawDescription = osInfo.FullName;
- scope.Contexts.OperatingSystem.Version = osInfo.Version.ToString();
- }
});
}
diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs
index fdb65535d..cf96c6839 100644
--- a/src/NzbDrone.Common/Processes/ProcessProvider.cs
+++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs
@@ -377,11 +377,6 @@ namespace NzbDrone.Common.Processes
private (string Path, string Args) GetPathAndArgs(string path, string args)
{
- if (PlatformInfo.IsMono && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase))
- {
- return ("mono", $"--debug {path} {args}");
- }
-
if (OsInfo.IsWindows && path.EndsWith(".bat", StringComparison.InvariantCultureIgnoreCase))
{
return ("cmd.exe", $"/c {path} {args}");
diff --git a/src/NzbDrone.Core.Test/MediaCoverTests/ImageResizerFixture.cs b/src/NzbDrone.Core.Test/MediaCoverTests/ImageResizerFixture.cs
index ea81b7d98..9583171ed 100644
--- a/src/NzbDrone.Core.Test/MediaCoverTests/ImageResizerFixture.cs
+++ b/src/NzbDrone.Core.Test/MediaCoverTests/ImageResizerFixture.cs
@@ -16,11 +16,6 @@ namespace NzbDrone.Core.Test.MediaCoverTests
[SetUp]
public void SetUp()
{
- if (PlatformInfo.IsMono && PlatformInfo.GetVersion() < new Version(5, 8))
- {
- Assert.Inconclusive("Not supported on Mono < 5.8");
- }
-
Mocker.GetMock()
.Setup(v => v.FileExists(It.IsAny()))
.Returns(s => File.Exists(s));
diff --git a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs
index c9c332d89..e2a49b318 100644
--- a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs
+++ b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs
@@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.UpdateTests
.Returns(true);
Mocker.GetMock()
- .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Readarr.Update.exe"))))
+ .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Readarr.Update".ProcessNameToExe()))))
.Returns(true);
_sandboxFolder = Mocker.GetMock().Object.GetUpdateSandboxFolder();
@@ -165,7 +165,7 @@ namespace NzbDrone.Core.Test.UpdateTests
public void should_return_with_warning_if_updater_doesnt_exists()
{
Mocker.GetMock()
- .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Readarr.Update.exe"))))
+ .Setup(v => v.FileExists(It.Is(s => s.EndsWith("Readarr.Update".ProcessNameToExe()))))
.Returns(false);
Subject.Execute(new ApplicationUpdateCommand());
diff --git a/src/NzbDrone.Core/HealthCheck/ServerSideNotificationService.cs b/src/NzbDrone.Core/HealthCheck/ServerSideNotificationService.cs
index 147738c32..754ae4112 100644
--- a/src/NzbDrone.Core/HealthCheck/ServerSideNotificationService.cs
+++ b/src/NzbDrone.Core/HealthCheck/ServerSideNotificationService.cs
@@ -52,7 +52,7 @@ namespace NzbDrone.Core.HealthCheck
.AddQueryParam("version", BuildInfo.Version)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
- .AddQueryParam("runtime", PlatformInfo.Platform.ToString().ToLowerInvariant())
+ .AddQueryParam("runtime", "netcore")
.AddQueryParam("branch", _configFileProvider.Branch)
.Build();
try
diff --git a/src/NzbDrone.Core/MediaCover/ImageResizer.cs b/src/NzbDrone.Core/MediaCover/ImageResizer.cs
index 60dde4633..ec2eefa78 100644
--- a/src/NzbDrone.Core/MediaCover/ImageResizer.cs
+++ b/src/NzbDrone.Core/MediaCover/ImageResizer.cs
@@ -1,4 +1,4 @@
-using NzbDrone.Common.Disk;
+using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
@@ -21,12 +21,6 @@ namespace NzbDrone.Core.MediaCover
{
_diskProvider = diskProvider;
- // Random segfaults on mono 5.0 and 5.4
- if (PlatformInfo.IsMono && platformInfo.Version < new System.Version(5, 8))
- {
- return;
- }
-
_enabled = true;
// More conservative memory allocation
diff --git a/src/NzbDrone.Core/Update/InstallUpdateService.cs b/src/NzbDrone.Core/Update/InstallUpdateService.cs
index a348e19ed..249617e66 100644
--- a/src/NzbDrone.Core/Update/InstallUpdateService.cs
+++ b/src/NzbDrone.Core/Update/InstallUpdateService.cs
@@ -146,7 +146,7 @@ namespace NzbDrone.Core.Update
_logger.Info("Preparing client");
_diskTransferService.TransferFolder(_appFolderInfo.GetUpdateClientFolder(), updateSandboxFolder, TransferMode.Move);
- var updateClientExePath = _appFolderInfo.GetUpdateClientExePath(updatePackage.Runtime);
+ var updateClientExePath = _appFolderInfo.GetUpdateClientExePath();
if (!_diskProvider.FileExists(updateClientExePath))
{
@@ -155,7 +155,7 @@ namespace NzbDrone.Core.Update
}
// Set executable flag on update app
- if (OsInfo.IsOsx || (OsInfo.IsLinux && PlatformInfo.IsNetCore))
+ if (OsInfo.IsOsx || OsInfo.IsLinux)
{
_diskProvider.SetFilePermissions(updateClientExePath, "755", null);
}
diff --git a/src/NzbDrone.Core/Update/UpdatePackage.cs b/src/NzbDrone.Core/Update/UpdatePackage.cs
index 016398d0f..ca97ad5d0 100644
--- a/src/NzbDrone.Core/Update/UpdatePackage.cs
+++ b/src/NzbDrone.Core/Update/UpdatePackage.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NzbDrone.Common.EnvironmentInfo;
namespace NzbDrone.Core.Update
@@ -12,6 +12,5 @@ namespace NzbDrone.Core.Update
public UpdateChanges Changes { get; set; }
public string Hash { get; set; }
public string Branch { get; set; }
- public PlatformType Runtime { get; set; }
}
}
diff --git a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs
index 9c72adccf..4946424b8 100644
--- a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs
+++ b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
+using FluentValidation.Validators;
using NzbDrone.Common.Cloud;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Http;
@@ -39,7 +40,7 @@ namespace NzbDrone.Core.Update
.AddQueryParam("version", currentVersion)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
- .AddQueryParam("runtime", PlatformInfo.Platform.ToString().ToLowerInvariant())
+ .AddQueryParam("runtime", "netcore")
.AddQueryParam("runtimeVer", _platformInfo.Version)
.AddQueryParam("dbType", _mainDatabase.DatabaseType)
.SetSegment("branch", branch);
@@ -67,7 +68,7 @@ namespace NzbDrone.Core.Update
.AddQueryParam("version", currentVersion)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
- .AddQueryParam("runtime", PlatformInfo.Platform.ToString().ToLowerInvariant())
+ .AddQueryParam("runtime", "netcore")
.AddQueryParam("runtimeVer", _platformInfo.Version)
.SetSegment("branch", branch);
diff --git a/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs b/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs
index 28e162410..b1c518c90 100644
--- a/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs
+++ b/src/NzbDrone.Mono.Test/DiskProviderTests/FreeSpaceFixture.cs
@@ -10,11 +10,6 @@ namespace NzbDrone.Mono.Test.DiskProviderTests
[Platform(Exclude = "Win")]
public class FreeSpaceFixture : FreeSpaceFixtureBase
{
- public FreeSpaceFixture()
- {
- MonoOnly();
- }
-
[SetUp]
public void Setup()
{
@@ -24,6 +19,7 @@ namespace NzbDrone.Mono.Test.DiskProviderTests
.Returns(s => s);
}
+ [Ignore("Docker")]
[Test]
public void should_be_able_to_check_space_on_ramdrive()
{
diff --git a/src/NzbDrone.Mono.Test/DiskProviderTests/SymlinkResolverFixture.cs b/src/NzbDrone.Mono.Test/DiskProviderTests/SymlinkResolverFixture.cs
index ac7fadd60..8b4bf2aee 100644
--- a/src/NzbDrone.Mono.Test/DiskProviderTests/SymlinkResolverFixture.cs
+++ b/src/NzbDrone.Mono.Test/DiskProviderTests/SymlinkResolverFixture.cs
@@ -8,14 +8,9 @@ using NzbDrone.Test.Common;
namespace NzbDrone.Mono.Test.DiskProviderTests
{
[TestFixture]
- [Platform("Mono")]
+ [Platform(Exclude = "Win")]
public class SymbolicLinkResolverFixture : TestBase
{
- public SymbolicLinkResolverFixture()
- {
- MonoOnly();
- }
-
[Test]
public void should_follow_nested_symlinks()
{
diff --git a/src/NzbDrone.Mono/Disk/DiskProvider.cs b/src/NzbDrone.Mono/Disk/DiskProvider.cs
index 91e7cf999..e369ea146 100644
--- a/src/NzbDrone.Mono/Disk/DiskProvider.cs
+++ b/src/NzbDrone.Mono/Disk/DiskProvider.cs
@@ -309,7 +309,7 @@ namespace NzbDrone.Mono.Disk
}
else
{
- base.MoveFileInternal(source, destination);
+ TransferFilePatched(source, destination, false, true);
}
}
@@ -321,9 +321,7 @@ namespace NzbDrone.Mono.Disk
// Catch the exception and attempt to handle these edgecases
// Mono 6.x till 6.10 doesn't properly try use rename first.
- if (move &&
- ((PlatformInfo.Platform == PlatformType.Mono && PlatformInfo.GetVersion() < new Version(6, 10)) ||
- (PlatformInfo.Platform == PlatformType.NetCore)))
+ if (move)
{
if (Syscall.lstat(source, out var sourcestat) == 0 &&
Syscall.lstat(destination, out var deststat) != 0 &&
@@ -351,32 +349,7 @@ namespace NzbDrone.Mono.Disk
var dstInfo = new FileInfo(destination);
var exists = dstInfo.Exists && srcInfo.Exists;
- if (PlatformInfo.Platform == PlatformType.Mono && PlatformInfo.GetVersion() >= new Version(6, 6) &&
- exists && dstInfo.Length == 0 && srcInfo.Length != 0)
- {
- // mono >=6.6 bug: zero length file since chmod happens at the start
- _logger.Debug("{3} failed to {2} file likely due to known {3} bug, attempting to {2} directly. '{0}' -> '{1}'", source, destination, move ? "move" : "copy", PlatformInfo.PlatformName);
-
- try
- {
- _logger.Trace("Copying content from {0} to {1} ({2} bytes)", source, destination, srcInfo.Length);
- using (var srcStream = new FileStream(source, FileMode.Open, FileAccess.Read))
- using (var dstStream = new FileStream(destination, FileMode.Create, FileAccess.Write))
- {
- srcStream.CopyTo(dstStream);
- }
- }
- catch
- {
- // If it fails again then bail
- throw;
- }
- }
- else if (((PlatformInfo.Platform == PlatformType.Mono &&
- PlatformInfo.GetVersion() >= new Version(6, 0) &&
- PlatformInfo.GetVersion() < new Version(6, 6)) ||
- PlatformInfo.Platform == PlatformType.NetCore) &&
- exists && dstInfo.Length == srcInfo.Length)
+ if (exists && dstInfo.Length == srcInfo.Length)
{
// mono 6.0, mono 6.4 and netcore 3.1 bug: full length file since utime and chmod happens at the end
_logger.Debug("{3} failed to {2} file likely due to known {3} bug, attempting to {2} directly. '{0}' -> '{1}'", source, destination, move ? "move" : "copy", PlatformInfo.PlatformName);
diff --git a/src/NzbDrone.Test.Common/NzbDroneRunner.cs b/src/NzbDrone.Test.Common/NzbDroneRunner.cs
index a10627ea4..a84864c5d 100644
--- a/src/NzbDrone.Test.Common/NzbDroneRunner.cs
+++ b/src/NzbDrone.Test.Common/NzbDroneRunner.cs
@@ -50,10 +50,6 @@ namespace NzbDrone.Test.Common
{
readarrConsoleExe = "Readarr.Console.exe";
}
- else if (PlatformInfo.IsMono)
- {
- readarrConsoleExe = "Readarr.exe";
- }
else
{
readarrConsoleExe = "Readarr";
diff --git a/src/NzbDrone.Test.Common/TestBase.cs b/src/NzbDrone.Test.Common/TestBase.cs
index 379ba4250..8a8d54828 100644
--- a/src/NzbDrone.Test.Common/TestBase.cs
+++ b/src/NzbDrone.Test.Common/TestBase.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.IO;
using System.Threading;
using FluentAssertions;
@@ -166,14 +166,6 @@ namespace NzbDrone.Test.Common
}
}
- protected void MonoOnly()
- {
- if (!PlatformInfo.IsMono)
- {
- throw new IgnoreException("mono specific test");
- }
- }
-
protected void NotBsd()
{
if (OsInfo.Os == Os.Bsd)
diff --git a/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs b/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs
index 989eb0c33..3f6802ddf 100644
--- a/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs
+++ b/src/NzbDrone.Update/UpdateEngine/InstallUpdateService.cs
@@ -125,8 +125,8 @@ namespace NzbDrone.Update.UpdateEngine
_logger.Info("Copying new files to target folder");
_diskTransferService.MirrorFolder(_appFolderInfo.GetUpdatePackageFolder(), installationFolder);
- // Set executable flag on Readarr app
- if (OsInfo.IsOsx || (OsInfo.IsLinux && PlatformInfo.IsNetCore))
+ // Set executable flag on app
+ if (OsInfo.IsOsx || OsInfo.IsLinux)
{
_diskProvider.SetFilePermissions(Path.Combine(installationFolder, "Readarr"), "755", null);
}
diff --git a/src/Readarr.Api.V1/System/SystemController.cs b/src/Readarr.Api.V1/System/SystemController.cs
index 24f47b09d..9c13bdbc8 100644
--- a/src/Readarr.Api.V1/System/SystemController.cs
+++ b/src/Readarr.Api.V1/System/SystemController.cs
@@ -70,8 +70,7 @@ namespace Readarr.Api.V1.System
AppData = _appFolderInfo.GetAppDataPath(),
OsName = _osInfo.Name,
OsVersion = _osInfo.Version,
- IsNetCore = PlatformInfo.IsNetCore,
- IsMono = PlatformInfo.IsMono,
+ IsNetCore = true,
IsLinux = OsInfo.IsLinux,
IsOsx = OsInfo.IsOsx,
IsWindows = OsInfo.IsWindows,
@@ -84,7 +83,7 @@ namespace Readarr.Api.V1.System
MigrationVersion = _database.Migration,
UrlBase = _configFileProvider.UrlBase,
RuntimeVersion = _platformInfo.Version,
- RuntimeName = PlatformInfo.Platform,
+ RuntimeName = "netcore",
StartTime = _runtimeInfo.StartTime,
PackageVersion = _deploymentInfoProvider.PackageVersion,
PackageAuthor = _deploymentInfoProvider.PackageAuthor,