1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-12-21 04:46:30 +00:00
tar-split/archive/tar
Kir Kolyshkin 9a95e02602 archive/tar: port RawHeader() changes
This is a port of commits adding RawHeader() to go-1.11 archive/tar.

In addition:
* simplify the rawBytes.Write() code in readHeader()
* ignore errors from rawBytes.Write(), as (at least for go-1.11)
  it never returns an error, only panics (if the buffer grew too large)

Also, remove the internal/testenv from tar_tar.go to enable go test.
As working symlink detection is non-trivial on Windows, just skip
the test on that platform.

In addition to `go test`, I did some minimal manual testing, and
it seems this code creates tar-data.json.gz which is identical
to the one made by the old version.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-09-05 17:12:53 -07:00
..
testdata archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
common.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
example_test.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
format.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
reader.go archive/tar: port RawHeader() changes 2018-09-05 17:12:53 -07:00
reader_test.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
stat_actime1.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
stat_actime2.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
stat_unix.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
strconv.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
strconv_test.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
tar_test.go archive/tar: port RawHeader() changes 2018-09-05 17:12:53 -07:00
writer.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00
writer_test.go archive/tar: replace with one from go-1.11 2018-09-05 14:04:10 -07:00