mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Fixed: Exception when parsing Quality in release title with colon
Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
@@ -72,6 +72,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))
|
||||
|
||||
Reference in New Issue
Block a user