From b0eadb6e45996ec1985f917c84a23977528df5f6 Mon Sep 17 00:00:00 2001 From: "red-hat-konflux[bot]" <126015336+red-hat-konflux[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 03:10:55 +0000 Subject: [PATCH] chore(deps): update module github.com/bmatcuk/doublestar/v4 to v4.10.4 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- .../bmatcuk/doublestar/v4/README.md | 3 +++ .../github.com/bmatcuk/doublestar/v4/glob.go | 5 +++-- .../bmatcuk/doublestar/v4/globoptions.go | 3 +++ .../github.com/bmatcuk/doublestar/v4/match.go | 22 +++++++++++++++++-- .../github.com/bmatcuk/doublestar/v4/utils.go | 10 +++++++++ vendor/modules.txt | 2 +- 8 files changed, 43 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 1ab9f4a0c..820396495 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( github.com/argoproj/pkg/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.10.4 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/bombsimon/logrusr/v4 v4.1.0 // indirect github.com/casbin/casbin/v2 v2.135.0 // indirect diff --git a/go.sum b/go.sum index 525cf4b7b..75a5a0362 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= -github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs= -github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.10.4 h1:oTKkRmRuOsKMqFe1AQazd9gGBFNEpOmgKp/xzB97dnA= +github.com/bmatcuk/doublestar/v4 v4.10.4/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bombsimon/logrusr/v4 v4.1.0 h1:uZNPbwusB0eUXlO8hIUwStE6Lr5bLN6IgYgG+75kuh4= diff --git a/vendor/github.com/bmatcuk/doublestar/v4/README.md b/vendor/github.com/bmatcuk/doublestar/v4/README.md index 57d18b0e5..5c0ae4cde 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/README.md +++ b/vendor/github.com/bmatcuk/doublestar/v4/README.md @@ -147,6 +147,9 @@ FilepathGlob. If passed, doublestar will treat all alphabetic characters as case insensitive (i.e. "a" in the pattern would match "a" or "A"). This is useful for platforms like Windows where paths are case insensitive by default. +Note that this case insensitive comparison is naïve, simply using +`unicode.ToLower()` to compare. + ```go WithFailOnIOErrors() ``` diff --git a/vendor/github.com/bmatcuk/doublestar/v4/glob.go b/vendor/github.com/bmatcuk/doublestar/v4/glob.go index f3ef03920..66ddbbd5e 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/glob.go +++ b/vendor/github.com/bmatcuk/doublestar/v4/glob.go @@ -410,10 +410,11 @@ func (g *glob) isPathDir(fsys fs.FS, name string, beforeMeta bool) (fs.FileInfo, } // Returns whether or not the given DirEntry is a directory. If the DirEntry -// represents a symbolic link, the link is followed by running fs.Stat() on +// represents a symbolic link or an irregular file (such as a Windows junction), +// the target is checked by running fs.Stat() on // `path.Join(dir, name)` (if dir is "", name will be used without joining) func (g *glob) isDir(fsys fs.FS, dir, name string, info fs.DirEntry) (bool, error) { - if !g.noFollow && (info.Type()&fs.ModeSymlink) > 0 { + if !g.noFollow && (info.Type()&(fs.ModeSymlink|fs.ModeIrregular)) > 0 { p := name if dir != "" { p = path.Join(dir, name) diff --git a/vendor/github.com/bmatcuk/doublestar/v4/globoptions.go b/vendor/github.com/bmatcuk/doublestar/v4/globoptions.go index 07c2bb816..9639d7a34 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/globoptions.go +++ b/vendor/github.com/bmatcuk/doublestar/v4/globoptions.go @@ -29,6 +29,9 @@ func newGlob(opts ...GlobOption) *glob { // FilepathGlob. If passed, doublestar will treat all alphabetic characters as // case insensitive (i.e. "a" in the pattern would match "a" or "A"). This is // useful for platforms like Windows where paths are case insensitive by default. +// +// Note that this case insensitive comparison is naïve, simply using +// `unicode.ToLower()` to compare. func WithCaseInsensitive() GlobOption { return func(g *glob) { g.caseInsensitive = true diff --git a/vendor/github.com/bmatcuk/doublestar/v4/match.go b/vendor/github.com/bmatcuk/doublestar/v4/match.go index 1ff50f617..907924378 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/match.go +++ b/vendor/github.com/bmatcuk/doublestar/v4/match.go @@ -95,7 +95,7 @@ func matchWithSeparator(pattern, name string, separator rune, validate bool, cas func doMatchWithSeparator(pattern, name string, separator rune, validate bool, caseInsensitive bool, doublestarPatternBacktrack, doublestarNameBacktrack, starPatternBacktrack, starNameBacktrack, patIdx, nameIdx int) (matched bool, err error) { patLen := len(pattern) nameLen := len(name) - startOfSegment := true + startOfSegment := patIdx == 0 || rune(pattern[patIdx-1]) == separator MATCH: for nameIdx < nameLen { if patIdx < patLen { @@ -176,7 +176,7 @@ MATCH: patRune, patRuneLen = utf8.DecodeRuneInString(pattern[patIdx:]) patIdx += patRuneLen - if last <= nameRune && nameRune <= patRune { + if matchRuneRange(last, patRune, nameRune, caseInsensitive) { matched = true break } @@ -316,6 +316,14 @@ MATCH: return isZeroLengthPattern(pattern[patIdx:], separator, validate) } +func matchRuneRange(lo, hi, r rune, caseInsensitive bool) bool { + if caseInsensitive { + rl := unicode.ToLower(r) + return unicode.ToLower(lo) <= rl && rl <= unicode.ToLower(hi) + } + return lo <= r && r <= hi +} + func matchRune(a, b rune, caseInsensitive bool) bool { if caseInsensitive { return unicode.ToLower(a) == unicode.ToLower(b) @@ -407,6 +415,16 @@ func indexMatchedClosingAlt(s string, allowEscaping bool) int { if allowEscaping && s[i] == '\\' { // skip next byte i++ + } else if s[i] == '[' { + // skip the character class so a '}' within it isn't mistaken for + // the closing brace of the alternation + for i++; i < l; i++ { + if allowEscaping && s[i] == '\\' { + i++ + } else if s[i] == ']' { + break + } + } } else if s[i] == '{' { alts++ } else if s[i] == '}' { diff --git a/vendor/github.com/bmatcuk/doublestar/v4/utils.go b/vendor/github.com/bmatcuk/doublestar/v4/utils.go index 498c0441d..2de7cfbc0 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/utils.go +++ b/vendor/github.com/bmatcuk/doublestar/v4/utils.go @@ -139,6 +139,16 @@ func indexNextAlt(s string, allowEscaping bool) int { if allowEscaping && s[i] == '\\' { // skip next byte i++ + } else if s[i] == '[' { + // skip the character class so commas within it aren't treated + // as alternative separators + for i++; i < l; i++ { + if allowEscaping && s[i] == '\\' { + i++ + } else if s[i] == ']' { + break + } + } } else if s[i] == '{' { alts++ } else if s[i] == '}' { diff --git a/vendor/modules.txt b/vendor/modules.txt index 20fe39289..a9bc8ddd3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -195,7 +195,7 @@ github.com/beorn7/perks/quantile # github.com/blang/semver/v4 v4.0.0 ## explicit; go 1.14 github.com/blang/semver/v4 -# github.com/bmatcuk/doublestar/v4 v4.10.0 +# github.com/bmatcuk/doublestar/v4 v4.10.4 ## explicit; go 1.16 github.com/bmatcuk/doublestar/v4 # github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869