1
0
Fork 0
forked from mirrors/tar-split

tar/asm: work with non-utf8 entry names

This commit is contained in:
Vincent Batts 2015-09-23 15:24:15 -04:00
parent 032efafc29
commit cde639172f
4 changed files with 63 additions and 12 deletions

View file

@ -92,13 +92,16 @@ func NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io
}
}
// File entries added, regardless of size
_, err = p.AddEntry(storage.Entry{
entry := storage.Entry{
Type: storage.FileType,
Name: hdr.Name,
Size: hdr.Size,
Payload: csum,
})
}
// For proper marshalling of non-utf8 characters
entry.SetName(hdr.Name)
// File entries added, regardless of size
_, err = p.AddEntry(entry)
if err != nil {
pW.CloseWithError(err)
return