From 0ce81e1ab69d43fde382cc4ae22cd46fe626dea7 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 4 Aug 2019 08:38:36 -0700 Subject: [PATCH] Fix SeriesFolderAsRootFolderValidator --- src/Sonarr.Api.V3/Series/SeriesFolderAsRootFolderValidator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sonarr.Api.V3/Series/SeriesFolderAsRootFolderValidator.cs b/src/Sonarr.Api.V3/Series/SeriesFolderAsRootFolderValidator.cs index 82413e356..3cf8e020b 100644 --- a/src/Sonarr.Api.V3/Series/SeriesFolderAsRootFolderValidator.cs +++ b/src/Sonarr.Api.V3/Series/SeriesFolderAsRootFolderValidator.cs @@ -31,7 +31,9 @@ namespace Sonarr.Api.V3.Series if (seriesFolder == rootFolder) return false; - return seriesFolder.LevenshteinDistance(rootFolder) <= Math.Max(1, seriesFolder.Length * 0.2); + var distance = seriesFolder.LevenshteinDistance(rootFolder); + + return distance >= Math.Max(1, seriesFolder.Length * 0.2); } } }