Accept the ? character

This commit is contained in:
Poornam 2018-11-15 19:49:35 +05:30 committed by GitHub
parent 6d10ae85ba
commit de4a4ea863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -845,7 +845,7 @@ func parseObjectPath(path string) (r objectPathResult) {
r.more = true
return
}
if path[i] == '*' || path[i] == '?' {
if path[i] == '*' || path[i] == '?' || r.wild == true {
r.wild = true
if (i + 1) < len(path) {
if path[i+1] == '.' {
@ -993,7 +993,7 @@ func parseObject(c *parseContext, i int, path string) (int, bool) {
break
}
if c.json[i] == '}' {
if rp.wild && strings.Contains(rp.part, "*") {
if rp.wild && (strings.Contains(rp.part, "*") || strings.Contains(rp.part, "?")) {
if rp.alogok {
var jsons = make([]byte, 0, 64)