1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-10-27 03:14:59 +08:00

Fix t0090 tar&gz unexpected EOF error

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
rht
2015-09-13 15:41:38 +07:00
parent a8dc708bc4
commit 23dd82f549
3 changed files with 31 additions and 12 deletions

View File

@ -60,8 +60,11 @@ func (w *Writer) writeFile(nd *mdag.Node, pb *upb.Data, fpath string) error {
}
dagr := uio.NewDataFileReader(w.ctx, nd, pb, w.Dag)
_, err := dagr.WriteTo(w.TarW)
return err
if _, err := dagr.WriteTo(w.TarW); err != nil {
return err
}
w.TarW.Flush()
return nil
}
func (w *Writer) WriteNode(nd *mdag.Node, fpath string) error {