mirror of https://github.com/containers/image.git
Remove an unnecessary pipe in ostreeImageSource.GetBlob
The pipe was used before commit c809f3dc87
to integrate a gzip.NewWriter; now it is not necessary,
so drop it.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
6191194b0d
commit
ff845eca82
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/containers/image/types"
|
"github.com/containers/image/types"
|
||||||
"github.com/containers/storage/pkg/ioutils"
|
"github.com/containers/storage/pkg/ioutils"
|
||||||
"github.com/klauspost/pgzip"
|
"github.com/klauspost/pgzip"
|
||||||
"github.com/opencontainers/go-digest"
|
digest "github.com/opencontainers/go-digest"
|
||||||
glib "github.com/ostreedev/ostree-go/pkg/glibobject"
|
glib "github.com/ostreedev/ostree-go/pkg/glibobject"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/vbatts/tar-split/tar/asm"
|
"github.com/vbatts/tar-split/tar/asm"
|
||||||
|
|
@ -323,13 +323,7 @@ func (s *ostreeImageSource) GetBlob(ctx context.Context, info types.BlobInfo, ca
|
||||||
|
|
||||||
ots := asm.NewOutputTarStream(getter, metaUnpacker)
|
ots := asm.NewOutputTarStream(getter, metaUnpacker)
|
||||||
|
|
||||||
pipeReader, pipeWriter := io.Pipe()
|
rc := ioutils.NewReadCloserWrapper(ots, func() error {
|
||||||
go func() {
|
|
||||||
io.Copy(pipeWriter, ots)
|
|
||||||
pipeWriter.Close()
|
|
||||||
}()
|
|
||||||
|
|
||||||
rc := ioutils.NewReadCloserWrapper(pipeReader, func() error {
|
|
||||||
getter.Close()
|
getter.Close()
|
||||||
mfz.Close()
|
mfz.Close()
|
||||||
return ots.Close()
|
return ots.Close()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue