diff --git a/client_integration_test.go b/client_integration_test.go index e040115..d916a2a 100644 --- a/client_integration_test.go +++ b/client_integration_test.go @@ -1882,6 +1882,7 @@ var globTests = []struct { {"match.go", "match.go"}, {"mat?h.go", "match.go"}, {"ma*ch.go", "match.go"}, + {`\m\a\t\c\h\.\g\o`, "match.go"}, {"../*/match.go", "../sftp/match.go"}, } diff --git a/match.go b/match.go index 1a2cab6..875006a 100644 --- a/match.go +++ b/match.go @@ -133,6 +133,5 @@ func Join(elem ...string) string { // hasMeta reports whether path contains any of the magic characters // recognized by Match. func hasMeta(path string) bool { - // TODO(niemeyer): Should other magic characters be added here? - return strings.ContainsAny(path, "*?[") + return strings.ContainsAny(path, "\\*?[") }