1
0
Fork 0
forked from mirrors/tar-split

WIP sparse file testing

This commit is contained in:
Vincent Batts 2015-12-01 11:03:47 -05:00
parent bece0c7009
commit 08360d3e06
4 changed files with 83 additions and 4 deletions

View file

@ -1,8 +1,10 @@
package asm
import (
"fmt"
"io"
"io/ioutil"
"os"
"github.com/vbatts/tar-split/archive/tar"
"github.com/vbatts/tar-split/tar/storage"
@ -92,6 +94,15 @@ func NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io
}
}
if hdr.Typeflag == tar.TypeGNUSparse {
e := storage.Entry{
Type: storage.SparseFileType,
}
fmt.Fprintln(os.Stderr, "WHOOP")
e.SetName(hdr.Name)
_, err = p.AddEntry(e)
}
entry := storage.Entry{
Type: storage.FileType,
Size: hdr.Size,