Skip to content

Commit

Permalink
fix: update path separator for windows glob (#2735)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Oct 8, 2024
1 parent ce26abd commit fcd8ea0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"sort"
Expand Down Expand Up @@ -1061,8 +1062,10 @@ func (c *seed) loadSeedPaths(basePath string, fsys fs.FS) error {
}
set := make(map[string]struct{})
for _, pattern := range c.GlobPatterns {
// Glob expects / as path separator on windows
pattern = filepath.ToSlash(pattern)
if !filepath.IsAbs(pattern) {
pattern = filepath.Join(basePath, pattern)
pattern = path.Join(basePath, pattern)
}
matches, err := fs.Glob(fsys, pattern)
if err != nil {
Expand Down

0 comments on commit fcd8ea0

Please sign in to comment.