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

Fixed: Exception when parsing Quality in release title with colon

This commit is contained in:
Taloth Saldono
2020-08-10 23:56:46 +02:00
parent 4a5bca860a
commit f3101a1db2
2 changed files with 13 additions and 1 deletions
@@ -57,6 +57,17 @@ namespace NzbDrone.Common.Extensions
return string.Equals(firstPath.CleanFilePath(), secondPath.CleanFilePath(), comparison.Value);
}
public static string GetPathExtension(this string path)
{
var idx = path.LastIndexOf('.');
if (idx == -1 || idx == path.Length - 1)
{
return string.Empty;
}
return path.Substring(idx);
}
public static string GetRelativePath(this string parentPath, string childPath)
{
if (!parentPath.IsParentPath(childPath))