mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-03-03 15:12:13 +02:00
Fixed IsValidPath usages
This commit is contained in:
parent
13a0dfa4ae
commit
033936dce7
@ -74,7 +74,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||||||
.Setup(x => x.FolderExists(It.IsAny<string>()))
|
.Setup(x => x.FolderExists(It.IsAny<string>()))
|
||||||
.Returns((string path) =>
|
.Returns((string path) =>
|
||||||
{
|
{
|
||||||
Ensure.That(path, () => path).IsValidPath();
|
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||||||
.Setup(x => x.FileExists(It.IsAny<string>()))
|
.Setup(x => x.FileExists(It.IsAny<string>()))
|
||||||
.Returns((string path) =>
|
.Returns((string path) =>
|
||||||
{
|
{
|
||||||
Ensure.That(path, () => path).IsValidPath();
|
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Runtime.Intrinsics.X86;
|
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Disk;
|
using NzbDrone.Common.Disk;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
@ -11,7 +10,6 @@ using NzbDrone.Core.Configuration;
|
|||||||
using NzbDrone.Core.Datastore.Events;
|
using NzbDrone.Core.Datastore.Events;
|
||||||
using NzbDrone.Core.Download;
|
using NzbDrone.Core.Download;
|
||||||
using NzbDrone.Core.Download.Clients;
|
using NzbDrone.Core.Download.Clients;
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
using NzbDrone.Core.ThingiProvider.Events;
|
using NzbDrone.Core.ThingiProvider.Events;
|
||||||
@ -164,7 +162,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, "Sonarr failed to import (an) episode(s). Check your logs for details.", "#remote-path-import-failed");
|
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)
|
if (!status.IsLocalhost)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user