mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 23:45:46 +02:00
Moved duplicated NormalizePath method to PathExtentions
This commit is contained in:
@@ -379,21 +379,6 @@ namespace NzbDrone.Core
|
||||
return NormalizeRegex.Replace(title, String.Empty).ToLower();
|
||||
}
|
||||
|
||||
public static string NormalizePath(string path)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(path))
|
||||
throw new ArgumentException("Path can not be null or empty");
|
||||
|
||||
var info = new FileInfo(path);
|
||||
|
||||
if (info.FullName.StartsWith(@"\\")) //UNC
|
||||
{
|
||||
return info.FullName.TrimEnd('/', '\\', ' ');
|
||||
}
|
||||
|
||||
return info.FullName.Trim('/', '\\', ' ');
|
||||
}
|
||||
|
||||
public static long GetReportSize(string sizeString)
|
||||
{
|
||||
var match = ReportSizeRegex.Matches(sizeString);
|
||||
|
Reference in New Issue
Block a user