From 13c538ff58ac93f3a116af12ecb965c841c8443f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 27 Sep 2024 16:45:38 -0700 Subject: [PATCH] Ignore extra spaces in path when not running on Windows (cherry picked from commit 6d0f10b877912edef21232c64339cc6548d9690e) --- src/NzbDrone.Common/Extensions/PathExtensions.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Common/Extensions/PathExtensions.cs b/src/NzbDrone.Common/Extensions/PathExtensions.cs index 0862d6737..78f0aaf1a 100644 --- a/src/NzbDrone.Common/Extensions/PathExtensions.cs +++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs @@ -147,14 +147,14 @@ namespace NzbDrone.Common.Extensions return false; } - if (path.Trim() != path) - { - return false; - } - // Only check for leading or trailing spaces for path when running on Windows. if (OsInfo.IsWindows) { + if (path.Trim() != path) + { + return false; + } + var directoryInfo = new DirectoryInfo(path); while (directoryInfo != null)