From: Robert Griesemer Date: Fri, 22 Jul 2011 22:21:50 +0000 (-0700) Subject: godoc/zip.go: fix another zip file system bug X-Git-Tag: weekly.2011-07-29~81 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e62e595e7a376740c894f281948e305ba2c0ffd1;p=gostls13.git godoc/zip.go: fix another zip file system bug Don't report that a directory was found just because we found the list index where the directory would be if it were there... R=iant CC=golang-dev https://golang.org/cl/4812051 --- diff --git a/src/cmd/godoc/zip.go b/src/cmd/godoc/zip.go index 28789f8a0b..868aa1f02f 100644 --- a/src/cmd/godoc/zip.go +++ b/src/cmd/godoc/zip.go @@ -198,5 +198,9 @@ func (z zipList) lookup(name string) (index int, exact bool) { if j < 0 { return -1, false } - return i + j, false + if strings.HasPrefix(z[j].Name, name) { + return i + j, false + } + + return -1, false }