diff --git a/src/NzbDrone.Common/Extensions/PathExtensions.cs b/src/NzbDrone.Common/Extensions/PathExtensions.cs index 9d0025a44..8f4c0b22d 100644 --- a/src/NzbDrone.Common/Extensions/PathExtensions.cs +++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs @@ -101,6 +101,11 @@ namespace NzbDrone.Common.Extensions { var cleanPath = childPath.GetCleanPath(); + if (cleanPath.IsNullOrWhiteSpace()) + { + return null; + } + return Directory.GetParent(cleanPath)?.Name; }