From faf2b0df474e7f4155dd81990fca30d2b5b94b99 Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Thu, 20 Dec 2018 19:37:36 -0800 Subject: [PATCH] Remove helper method that creates regex filter. This will discourage the creation of default regex filters, which exhibit poor performance. --- Duplicati/Library/Utility/FilterGroups.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Duplicati/Library/Utility/FilterGroups.cs b/Duplicati/Library/Utility/FilterGroups.cs index 07cbacfd8..27daa239f 100644 --- a/Duplicati/Library/Utility/FilterGroups.cs +++ b/Duplicati/Library/Utility/FilterGroups.cs @@ -605,18 +605,6 @@ namespace Duplicati.Library.Utility return filter.Replace(System.IO.Path.AltDirectorySeparatorChar, System.IO.Path.DirectorySeparatorChar); } - /// - /// Creates a Regex filter - /// - /// Filter text - /// Regex filter - 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) + "]"; - } - /// /// Gets a list of exclude paths from the MacOS system ///