Added ParentUriString to get the parent site URI from any URI.

This commit is contained in:
Mark McDowall 2011-11-12 12:21:19 -08:00
commit f3f2691b4d
2 changed files with 85 additions and 1 deletions

View file

@ -49,7 +49,7 @@ namespace NzbDrone.Core
public static string ParentUriString(this Uri uri)
{
return uri.AbsoluteUri.Remove(uri.AbsoluteUri.Length - String.Join("", uri.Segments).Length);
return uri.AbsoluteUri.Remove(uri.AbsoluteUri.Length - String.Join("", uri.Segments).Length - uri.Query.Length);
}
}
}