| 1 |
From: "Dr. Tobias Quathamer" <[email protected]> |
| 2 |
Date: Sat, 26 Sep 2026 16:08:02 +0200 |
| 3 |
Subject: Fix FTBFS with gobwas/glob v1 |
| 4 |
|
| 5 |
--- |
| 6 |
utils.go | 5 +++++ |
| 7 |
1 file changed, 5 insertions(+) |
| 8 |
|
| 9 |
diff --git a/utils.go b/utils.go |
| 10 |
index a639d41..5d279a9 100644 |
| 11 |
--- a/utils.go |
| 12 |
+++ b/utils.go |
| 13 |
@@ -25,6 +25,11 @@ import ( |
| 14 |
// - (false, nil) if the string does not match. |
| 15 |
// - (false, error) if the pattern is invalid. |
| 16 |
func globMatch(pattern, s string) (bool, error) { |
| 17 |
+ pattern = strings.ReplaceAll(pattern, "/**/", "/{**/,}") |
| 18 |
+ if pattern, found := strings.CutPrefix(pattern, "**/"); found { |
| 19 |
+ pattern = "{**/,}" + pattern |
| 20 |
+ } |
| 21 |
+ |
| 22 |
g, err := glob.Compile(pattern, '/') |
| 23 |
if err != nil { |
| 24 |
return false, err |