- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for ErrBadPattern (0.15 sec)
-
src/io/fs/glob_test.go
} } } func TestGlobError(t *testing.T) { bad := []string{`[]`, `nonexist/[]`} for _, pattern := range bad { _, err := Glob(os.DirFS("."), pattern) if err != path.ErrBadPattern { t.Errorf("Glob(fs, %#q) returned err=%v, want path.ErrBadPattern", pattern, err) } } } func TestCVE202230630(t *testing.T) { // Prior to CVE-2022-30630, a stack exhaustion would occur given a large
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:36:52 UTC 2024 - 2.3K bytes - Viewed (0) -
src/path/filepath/match_test.go
{"[]a]", "]", false, ErrBadPattern}, {"[-]", "-", false, ErrBadPattern}, {"[x-]", "x", false, ErrBadPattern}, {"[x-]", "-", false, ErrBadPattern}, {"[x-]", "z", false, ErrBadPattern}, {"[-x]", "x", false, ErrBadPattern}, {"[-x]", "-", false, ErrBadPattern}, {"[-x]", "a", false, ErrBadPattern}, {"\\", "a", false, ErrBadPattern}, {"[a-b-c]", "a", false, ErrBadPattern}, {"[", "a", false, ErrBadPattern},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:38:19 UTC 2024 - 8.6K bytes - Viewed (0) -
src/path/match.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 23 17:33:57 UTC 2023 - 5.3K bytes - Viewed (0) -
src/path/filepath/match.go
if len(chunk) == 0 || chunk[0] == '-' || chunk[0] == ']' { err = ErrBadPattern return } if chunk[0] == '\\' && runtime.GOOS != "windows" { chunk = chunk[1:] if len(chunk) == 0 { err = ErrBadPattern return } } r, n := utf8.DecodeRuneInString(chunk) if r == utf8.RuneError && n == 1 { err = ErrBadPattern } nchunk = chunk[n:] if len(nchunk) == 0 { err = ErrBadPattern
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.7K bytes - Viewed (0) -
src/io/fs/glob.go
// as in [path.Match]. The pattern may describe hierarchical names such as // usr/*/bin/ed. // // Glob ignores file system errors such as I/O errors reading directories. // The only possible returned error is [path.ErrBadPattern], reporting that // the pattern is malformed. // // If fs implements [GlobFS], Glob calls fs.Glob. // Otherwise, Glob uses [ReadDir] to traverse the directory tree // and look for matches for the pattern.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 11 20:25:50 UTC 2023 - 3.1K bytes - Viewed (0) -
src/testing/fstest/testfs.go
} } elem[i] = string(pattern) } glob = strings.Join(elem, "/") + "/" } // Test that malformed patterns are detected. // The error is likely path.ErrBadPattern but need not be. if _, err := t.fsys.(fs.GlobFS).Glob(glob + "nonexist/[]"); err == nil { t.errorf("%s: Glob(%#q): bad pattern not detected", dir, glob+"nonexist/[]") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 16.3K bytes - Viewed (0) -
src/cmd/go/internal/fsys/fsys.go
dir = cleanGlobPath(dir) } if !hasMeta(dir[volumeLen:]) { return glob(dir, file, nil) } // Prevent infinite recursion. See issue 15879. if dir == pattern { return nil, filepath.ErrBadPattern } var m []string m, err = Glob(dir) if err != nil { return } for _, d := range m { matches, err = glob(d, file, matches) if err != nil { return } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 18:35:34 UTC 2024 - 22.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Base", Func, 0}, {"Clean", Func, 0}, {"Dir", Func, 0}, {"ErrBadPattern", Var, 0}, {"Ext", Func, 0}, {"IsAbs", Func, 0}, {"Join", Func, 0}, {"Match", Func, 0}, {"Split", Func, 0}, }, "path/filepath": { {"Abs", Func, 0}, {"Base", Func, 0}, {"Clean", Func, 0}, {"Dir", Func, 0}, {"ErrBadPattern", Var, 0}, {"EvalSymlinks", Func, 0}, {"Ext", Func, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)