go/loader: convert directory separators to slash when enumerating packages.
(On Windows the two are not the same.) Fixes golang/go#7189. Also: remove exception for code.google.com subtree; this was an artifact of my unusual setup. LGTM=gri R=alex.brainman, gri CC=golang-codereviews https://golang.org/cl/70060048
This commit is contained in:
parent
53324e8992
commit
5536d2ae3e
|
@ -33,9 +33,9 @@ func allPackages() []string {
|
|||
return filepath.SkipDir
|
||||
}
|
||||
if info.IsDir() {
|
||||
pkg := strings.TrimPrefix(path, root)
|
||||
pkg := filepath.ToSlash(strings.TrimPrefix(path, root))
|
||||
switch pkg {
|
||||
case "builtin", "pkg", "code.google.com":
|
||||
case "builtin", "pkg":
|
||||
return filepath.SkipDir // skip these subtrees
|
||||
case "":
|
||||
return nil // ignore root of tree
|
||||
|
|
Loading…
Reference in New Issue