You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-11-06 09:19:38 +02:00
Handle null for parent name with clean path is empty
This commit is contained in:
@@ -100,6 +100,11 @@ namespace NzbDrone.Common.Extensions
|
|||||||
{
|
{
|
||||||
var cleanPath = childPath.GetCleanPath();
|
var cleanPath = childPath.GetCleanPath();
|
||||||
|
|
||||||
|
if (cleanPath.IsNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return Directory.GetParent(cleanPath)?.Name;
|
return Directory.GetParent(cleanPath)?.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user