From 0b8271f2921515165306ce90cb11c8234e295c5e Mon Sep 17 00:00:00 2001 From: Jeromy Date: Fri, 28 Oct 2016 17:29:24 -0700 Subject: [PATCH] dont buffer entire input for tar adds License: MIT Signed-off-by: Jeromy --- tar/format.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tar/format.go b/tar/format.go index 8313afd0438..4ca2383f350 100644 --- a/tar/format.go +++ b/tar/format.go @@ -6,7 +6,6 @@ import ( "context" "errors" "io" - "io/ioutil" "strings" importer "github.com/ipfs/go-ipfs/importer" @@ -36,13 +35,6 @@ func marshalHeader(h *tar.Header) ([]byte, error) { } func ImportTar(r io.Reader, ds dag.DAGService) (*dag.ProtoNode, error) { - rall, err := ioutil.ReadAll(r) - if err != nil { - return nil, err - } - - r = bytes.NewReader(rall) - tr := tar.NewReader(r) root := new(dag.ProtoNode)