mirror of
https://github.com/go-task/task.git
synced 2026-07-08 22:46:07 +00:00
Update dependencies
This commit is contained in:
10
vendor/github.com/mattn/go-zglob/zglob.go
generated
vendored
10
vendor/github.com/mattn/go-zglob/zglob.go
generated
vendored
@@ -73,7 +73,9 @@ func makePattern(pattern string) (*zenv, error) {
|
||||
if cc[i] == '*' {
|
||||
if i < len(cc)-2 && cc[i+1] == '*' && cc[i+2] == '/' {
|
||||
filemask += "(.*/)?"
|
||||
dirmask = filemask
|
||||
if dirmask == "" {
|
||||
dirmask = filemask
|
||||
}
|
||||
i += 2
|
||||
} else {
|
||||
filemask += "[^/]*"
|
||||
@@ -153,6 +155,12 @@ func glob(pattern string, followSymlinks bool) ([]string, error) {
|
||||
if path == "." || len(path) <= len(zenv.root) {
|
||||
return nil
|
||||
}
|
||||
if zenv.fre.MatchString(path) {
|
||||
mu.Lock()
|
||||
matches = append(matches, path)
|
||||
mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
if !zenv.dre.MatchString(path + "/") {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user