Remove helper method that creates regex filter.
This will discourage the creation of default regex filters, which exhibit poor performance.
This commit is contained in:
@@ -605,18 +605,6 @@ namespace Duplicati.Library.Utility
|
||||
return filter.Replace(System.IO.Path.AltDirectorySeparatorChar, System.IO.Path.DirectorySeparatorChar);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a Regex filter
|
||||
/// </summary>
|
||||
/// <param name="filter">Filter text</param>
|
||||
/// <returns>Regex filter</returns>
|
||||
private static string CreateRegexFilter(string filter)
|
||||
{
|
||||
// Create a filter with the given name.
|
||||
// However, in order to match paths correctly, the directory separators need to be normalized to match the system default.
|
||||
return "[" + filter.Replace(FilterGroups.RegexEscapedAltDirectorySeparatorChar, FilterGroups.RegexEscapedDirectorySeparatorChar) + "]";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of exclude paths from the MacOS system
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user