mirror of
https://github.com/golang/go
synced 2024-11-22 02:04:40 -07:00
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
This commit is contained in:
parent
fa497796f5
commit
e62e595e7a
@ -198,5 +198,9 @@ func (z zipList) lookup(name string) (index int, exact bool) {
|
|||||||
if j < 0 {
|
if j < 0 {
|
||||||
return -1, false
|
return -1, false
|
||||||
}
|
}
|
||||||
return i + j, false
|
if strings.HasPrefix(z[j].Name, name) {
|
||||||
|
return i + j, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1, false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user