mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-05 16:47:31 -04:00
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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user