Update dependencies

This commit is contained in:
Andrey Nering
2018-01-03 15:12:40 -02:00
parent 134c6b79c4
commit e23a6dc9f1
145 changed files with 5667 additions and 1596 deletions

View File

@@ -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
}