1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Be more proper about Ensuring the folder exists

Still need a way to tell the UI model to update itself
This commit is contained in:
Tim Turner
2017-01-25 20:11:02 -05:00
parent 72aac6e551
commit 7da2183080
2 changed files with 12 additions and 22 deletions
@@ -64,6 +64,11 @@ namespace NzbDrone.Common.Extensions
return childPath.Substring(parentPath.Length).Trim(Path.DirectorySeparatorChar);
}
public static string GetRelativePathWithoutChildCheck(this string parentPath, string childPath)
{
return childPath.Substring(parentPath.Length).Trim(Path.DirectorySeparatorChar);
}
public static string GetParentPath(this string childPath)
{
var parentPath = childPath.TrimEnd('\\', '/');