Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(81)

Issue 162047: code review 162047: Minor fixes for tar/archive. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 7 months ago by _cw_
Modified:
15 years, 7 months ago
Reviewers:
dsymonds, rsc
Visibility:
Public.

Description

Minor fixes for tar/archive. 1. If all data is exhausted using .Read() then a following .Next() will fail as if it saw EOF. A test case for this was added. It verifies the data using MD5. 2. The 'Seeker' check isn't robust so we get seek failures on non-seekable descriptors. Fix to fallback to doing a read. A test case for this was added. 3. It's common (normal?) to get numerous 'empty' Headers at the end of a tar file from .Next() before we get an EOF. Suppress these. One of the test cases (TestReader) was modified to accommodate this.

Patch Set 1 #

Patch Set 2 : code review 162047: Minor fixes for tar/archive. #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -35 lines) Patch
M src/pkg/archive/tar/reader.go View 3 chunks +28 lines, -8 lines 10 comments Download
M src/pkg/archive/tar/reader_test.go View 3 chunks +133 lines, -27 lines 2 comments Download

Messages

Total messages: 9
_cw_
Some minor changes to archive/tar/reader.go Arguably, these changes could be be broken up into separate ...
15 years, 7 months ago (2009-11-28 01:35:47 UTC) #1
_cw_
Hello r, rsc, I'd like you to review the following change.
15 years, 7 months ago (2009-11-28 02:02:06 UTC) #2
rsc
Thanks for tracking these down. I think the fix might be slightly different, as noted ...
15 years, 7 months ago (2009-11-30 00:01:41 UTC) #3
dsymonds
http://codereview.appspot.com/162047/diff/1001/1002 File src/pkg/archive/tar/reader.go (right): http://codereview.appspot.com/162047/diff/1001/1002#newcode110 src/pkg/archive/tar/reader.go:110: // Seeker failed; fallback to read I'm not sure ...
15 years, 7 months ago (2009-11-30 01:41:42 UTC) #4
rsc
Yes, you can't seek on pipes but they have a Seek method because they are ...
15 years, 7 months ago (2009-11-30 02:12:22 UTC) #5
rsc
Also, seek returns an absolute offset, not a count, so it should probably be ignored ...
15 years, 7 months ago (2009-11-30 02:13:04 UTC) #6
_cw_
updated comments, updated code to follow shortly rsc: "The new code works on pipes (there ...
15 years, 7 months ago (2009-11-30 06:22:58 UTC) #7
rsc
On Sun, Nov 29, 2009 at 22:22, <chris.wedgwood@gmail.com> wrote: > updated comments, updated code to ...
15 years, 7 months ago (2009-11-30 07:27:27 UTC) #8
_cw_
15 years, 7 months ago (2009-11-30 09:51:42 UTC) #9
*** Abandoned ***
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b