Replace archive/tar fork with use of archive/tar

Since Go 1.6, archive/tar has gained public support for custom PAX
Records, so there's no need to maintain a fork of this library anymore.

We do end up with a fork of the PAX timestamp parsing/formatting
functions, but they are much less likely to change.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
Paul "TBBle" Hampson
2020-07-17 00:45:58 +10:00
parent 3fe6c52628
commit cb5cf8987b
37 changed files with 108 additions and 4188 deletions
+4 -4
View File
@@ -1,6 +1,7 @@
package backuptar
import (
"archive/tar"
"bytes"
"io/ioutil"
"os"
@@ -9,7 +10,6 @@ import (
"testing"
"github.com/Microsoft/go-winio"
"github.com/Microsoft/go-winio/archive/tar"
)
func ensurePresent(t *testing.T, m map[string]string, keys ...string) {
@@ -76,9 +76,9 @@ func TestRoundTrip(t *testing.T) {
t.Errorf("got size %d, expected %d", size, fi.Size())
}
if !reflect.DeepEqual(*bi, *bi2) {
t.Errorf("got %#v, expected %#v", *bi, *bi2)
if !reflect.DeepEqual(*bi2, *bi) {
t.Errorf("got %#v, expected %#v", *bi2, *bi)
}
ensurePresent(t, hdr.Winheaders, "fileattr", "rawsd")
ensurePresent(t, hdr.PAXRecords, "MSWINDOWS.fileattr", "MSWINDOWS.rawsd")
}