Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ad0e8b31
Commit
ad0e8b31
authored
Nov 07, 2011
by
Dmitry Chestnykh
Committed by
Andrew Gerrand
Nov 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/zip: actually close file opened with OpenReader.
R=golang-dev, adg CC=golang-dev
https://golang.org/cl/5341044
parent
75af79b9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
reader.go
src/pkg/archive/zip/reader.go
+1
-0
reader_test.go
src/pkg/archive/zip/reader_test.go
+5
-1
No files found.
src/pkg/archive/zip/reader.go
View file @
ad0e8b31
...
...
@@ -60,6 +60,7 @@ func OpenReader(name string) (*ReadCloser, error) {
f
.
Close
()
return
nil
,
err
}
r
.
f
=
f
return
r
,
nil
}
...
...
src/pkg/archive/zip/reader_test.go
View file @
ad0e8b31
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment