filetime: support case insensitive matching (#2132)

This commit is contained in:
Jan-Otto Kröpke
2025-07-13 01:51:40 +02:00
committed by GitHub
parent 524fea08c4
commit 52056a5cd9
3 changed files with 4 additions and 4 deletions

View File

@@ -142,7 +142,7 @@ func (c *Collector) collectGlobFilePath(ch chan<- prometheus.Metric, filePattern
basePath, pattern := doublestar.SplitPattern(filePattern)
basePathFS := os.DirFS(basePath)
matches, err := doublestar.Glob(basePathFS, pattern, doublestar.WithFilesOnly())
matches, err := doublestar.Glob(basePathFS, pattern, doublestar.WithFilesOnly(), doublestar.WithCaseInsensitive())
if err != nil {
return fmt.Errorf("failed to glob: %w", err)
}