lib/osutil: Prevent infinite Glob recursion (fixes #3577)
Skip-check: authors GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3665
This commit is contained in:
@@ -26,7 +26,7 @@ func Glob(pattern string) (matches []string, err error) {
|
||||
return []string{pattern}, nil
|
||||
}
|
||||
|
||||
dir, file := filepath.Split(pattern)
|
||||
dir, file := filepath.Split(filepath.Clean(pattern))
|
||||
switch dir {
|
||||
case "":
|
||||
dir = "."
|
||||
|
||||
Reference in New Issue
Block a user