From 033936dce7e13c8ab2e38407782dc9cdd949460e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 26 Mar 2023 22:47:09 -0700 Subject: [PATCH] Fixed IsValidPath usages --- .../HealthCheck/Checks/RemotePathMappingCheckFixture.cs | 4 ++-- .../HealthCheck/Checks/RemotePathMappingCheck.cs | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core.Test/HealthCheck/Checks/RemotePathMappingCheckFixture.cs b/src/NzbDrone.Core.Test/HealthCheck/Checks/RemotePathMappingCheckFixture.cs index 20b034934..1581e237b 100644 --- a/src/NzbDrone.Core.Test/HealthCheck/Checks/RemotePathMappingCheckFixture.cs +++ b/src/NzbDrone.Core.Test/HealthCheck/Checks/RemotePathMappingCheckFixture.cs @@ -74,7 +74,7 @@ public void Setup() .Setup(x => x.FolderExists(It.IsAny())) .Returns((string path) => { - Ensure.That(path, () => path).IsValidPath(); + Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs); return false; }); @@ -82,7 +82,7 @@ public void Setup() .Setup(x => x.FileExists(It.IsAny())) .Returns((string path) => { - Ensure.That(path, () => path).IsValidPath(); + Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs); return false; }); diff --git a/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs index 37b0f9a80..3e5b8e777 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs @@ -1,7 +1,6 @@ using System; using System.Linq; using System.Net.Http; -using System.Runtime.Intrinsics.X86; using NLog; using NzbDrone.Common.Disk; using NzbDrone.Common.EnvironmentInfo; @@ -11,7 +10,6 @@ using NzbDrone.Core.Datastore.Events; using NzbDrone.Core.Download; using NzbDrone.Core.Download.Clients; -using NzbDrone.Core.Localization; using NzbDrone.Core.MediaFiles.Events; using NzbDrone.Core.RemotePathMappings; using NzbDrone.Core.ThingiProvider.Events; @@ -164,7 +162,7 @@ public HealthCheck Check(IEvent message) return new HealthCheck(GetType(), HealthCheckResult.Error, "Sonarr failed to import (an) episode(s). Check your logs for details.", "#remote-path-import-failed"); } - if (!dlpath.IsPathValid()) + if (!dlpath.IsPathValid(PathValidationType.CurrentOs)) { if (!status.IsLocalhost) {