filetime: support windows paths (#2118) (#2146)

This commit is contained in:
Jan-Otto Kröpke
2025-07-20 08:35:33 +02:00
committed by GitHub
parent 15156ce444
commit 66d207b0e2
3 changed files with 4 additions and 22 deletions

View File

@@ -149,7 +149,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)
}