]> Cypherpunks repositories - gostls13.git/commit
archive/tar: Fix bug preventing untar
authorGuillaume J. Charmes <guillaume@charmes.net>
Wed, 14 May 2014 17:15:43 +0000 (10:15 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 14 May 2014 17:15:43 +0000 (10:15 -0700)
commit51f3cbabfc58c0db89b1142f94d794b59727f572
treee457e55c271c06f1edbca94f20aeb6bb6c919d1f
parent8c2fefe89cbc9fa64e600c400d127905e3c375a5
archive/tar: Fix bug preventing untar

Do not use ustar format if we need the GNU one.
Change \000 to \x00 for consistency
Check for "ustar\x00" instead of "ustar\x00\x00" for conistency with tar
and compatiblity with archive generated with older code (which was ustar\x00\x20\x00)
Add test for long name + big file.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/99050043
src/pkg/archive/tar/reader.go
src/pkg/archive/tar/testdata/writer-big-long.tar [new file with mode: 0644]
src/pkg/archive/tar/writer.go
src/pkg/archive/tar/writer_test.go