From d5b131cacdaac75707f8cdd8e0e6353fbf8705e4 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 3 Jun 2024 16:17:20 -0700 Subject: [PATCH] Fixed: Skip invalid series paths during validation --- src/NzbDrone.Core/Validation/Paths/SeriesPathValidator.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Validation/Paths/SeriesPathValidator.cs b/src/NzbDrone.Core/Validation/Paths/SeriesPathValidator.cs index 66f2f7689..da8705ff0 100644 --- a/src/NzbDrone.Core/Validation/Paths/SeriesPathValidator.cs +++ b/src/NzbDrone.Core/Validation/Paths/SeriesPathValidator.cs @@ -1,5 +1,6 @@ using System.Linq; using FluentValidation.Validators; +using NzbDrone.Common.Disk; using NzbDrone.Common.Extensions; using NzbDrone.Core.Tv; @@ -28,7 +29,10 @@ namespace NzbDrone.Core.Validation.Paths dynamic instance = context.ParentContext.InstanceToValidate; var instanceId = (int)instance.Id; - return !_seriesService.GetAllSeriesPaths().Any(s => s.Value.PathEquals(context.PropertyValue.ToString()) && s.Key != instanceId); + // Skip the path for this series and any invalid paths + return !_seriesService.GetAllSeriesPaths().Any(s => s.Key != instanceId && + s.Value.IsPathValid(PathValidationType.CurrentOs) && + s.Value.PathEquals(context.PropertyValue.ToString())); } } }