forked from mirrors/tar-split
tar/asm: work with non-utf8 entry names
This commit is contained in:
parent
032efafc29
commit
cde639172f
4 changed files with 63 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue