diff --git a/src/main/java/com/crowdin/cli/properties/helper/FileMatcher.java b/src/main/java/com/crowdin/cli/properties/helper/FileMatcher.java index 9504e538d..1490ad279 100644 --- a/src/main/java/com/crowdin/cli/properties/helper/FileMatcher.java +++ b/src/main/java/com/crowdin/cli/properties/helper/FileMatcher.java @@ -28,9 +28,6 @@ class FileMatcher implements PathMatcher { pattern = pattern.replaceAll("/+", "/"); pattern = pattern.replaceAll("\\{\\{+", "\\\\{\\\\{"); pattern = pattern.replaceAll("}}+", "\\\\}\\\\}"); - pattern = pattern.replaceAll("\\[+", "\\\\["); - pattern = pattern.replaceAll("]+", "\\\\]"); - // We *could* implement exactly what's documented. The idea would be to implement something like // Java's Globs.toRegexPattern but supporting only the documented syntax. Instead, we will use diff --git a/src/test/java/com/crowdin/cli/properties/helper/FileHelperTest.java b/src/test/java/com/crowdin/cli/properties/helper/FileHelperTest.java index 6343607da..f52dea73a 100644 --- a/src/test/java/com/crowdin/cli/properties/helper/FileHelperTest.java +++ b/src/test/java/com/crowdin/cli/properties/helper/FileHelperTest.java @@ -84,7 +84,6 @@ public void testFilterSourcesWithSpecialSymbols() { sources.add(new File("/files/folder/sub/1.xml")); sources.add(new File("/files/{{cookiecutter.module_name}}")); sources.add(new File("/files/{{cookiecutter.module_name}}/1.xml")); - sources.add(new File("/files/[folder-sub]/1.xml")); FileHelper fileHelper = new FileHelper(project.getBasePath()); List actualResult = fileHelper.filterOutIgnoredFiles(sources, Arrays.asList(".*")); assertEquals(sources, actualResult);