Commit a8e0a757 authored by Russ Cox's avatar Russ Cox

go/build: undo CL 7129048

This broke 'godoc net/http'.

TBR=adg
CC=golang-dev
https://golang.org/cl/7235052
parent 2cd5b014
......@@ -322,7 +322,9 @@ func (p *Package) IsCommand() bool {
// the named directory.
func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error) {
p, err := ctxt.Import(".", dir, mode)
if err == nil && !ctxt.isDir(p.Dir) {
// TODO(rsc,adg): breaks godoc net/http. Not sure why.
// See CL 7232047 and issue 4696.
if false && err == nil && !ctxt.isDir(p.Dir) {
err = fmt.Errorf("%q is not a directory", p.Dir)
}
return p, err
......
......@@ -92,6 +92,7 @@ func TestLocalDirectory(t *testing.T) {
// golang.org/issue/3248
func TestBogusDirectory(t *testing.T) {
return // See issue 4696.
const dir = "/foo/bar/baz/gopher"
_, err := ImportDir(dir, FindOnly)
want := fmt.Sprintf("%q is not a directory", filepath.FromSlash(dir))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment