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:
Kenneth Hsu
2018-12-20 19:37:36 -08:00
parent 340d7803cb
commit faf2b0df47
-12
View File
@@ -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>