1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

Fix path tests

This commit is contained in:
Mark McDowall
2019-01-10 20:32:18 -08:00
parent fc2a586453
commit e3a9f753d2
3 changed files with 9 additions and 4 deletions
@@ -73,6 +73,11 @@ namespace NzbDrone.Common.Extensions
? PARENT_PATH_END_SLASH_REGEX.Replace(childPath, "")
: childPath.TrimEnd(Path.DirectorySeparatorChar);
if (cleanPath.IsNullOrWhiteSpace())
{
return null;
}
return Directory.GetParent(cleanPath)?.FullName;
}