pathtools: Fixed absolute path bug in Glob.

Change-Id: I30ba550449787648f6dca052b89f4eb7722bcb55
This commit is contained in:
Nico Hailey 2014-10-29 18:32:48 -07:00 committed by Colin Cross
parent af43556ce3
commit b6a5039e88

View file

@ -21,7 +21,8 @@ func Glob(pattern string) (matches, dirs []string, err error) {
dirElems := strings.Split(dir, string(filepath.Separator))
for _, index := range wildIndices {
dirs = append(dirs, filepath.Join(dirElems[:index]...))
dirs = append(dirs, strings.Join(dirElems[:index],
string(filepath.Separator)))
}
}
}