Commit ad0e8b31 authored by Dmitry Chestnykh's avatar Dmitry Chestnykh Committed by Andrew Gerrand

archive/zip: actually close file opened with OpenReader.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5341044
parent 75af79b9
......@@ -60,6 +60,7 @@ func OpenReader(name string) (*ReadCloser, error) {
f.Close()
return nil, err
}
r.f = f
return r, nil
}
......
......@@ -98,7 +98,11 @@ func readTestZip(t *testing.T, zt ZipTest) {
if err == FormatError {
return
}
defer z.Close()
defer func() {
if err := z.Close(); err != nil {
t.Errorf("error %q when closing zip file", err)
}
}()
// bail here if no Files expected to be tested
// (there may actually be files in the zip, but we don't care)
......
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