Trim directory separators in GetRelativePath

(cherry picked from commit 240a0339bee7d407e564df6b6575a2ade6ac03cd)
This commit is contained in:
Bogdan
2024-10-25 09:42:55 +03:00
parent 246fb9b855
commit 9655f37fa8
2 changed files with 21 additions and 1 deletions
@@ -87,7 +87,7 @@ namespace NzbDrone.Common.Extensions
throw new NotParentException("{0} is not a child of {1}", childPath, parentPath);
}
return childPath.Substring(parentPath.Length).Trim(Path.DirectorySeparatorChar);
return childPath.Substring(parentPath.Length).Trim('\\', '/');
}
public static string GetParentPath(this string childPath)