Only pass an io.Reader to invokeUnpack
... which allows us to remove an unnecessary NopCloser. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
2d90000b09
commit
f3316c595f
|
|
@ -82,7 +82,7 @@ func untarHandler(tarArchive io.Reader, dest string, options *archive.TarOptions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r := io.NopCloser(tarArchive)
|
r := tarArchive
|
||||||
if decompress {
|
if decompress {
|
||||||
decompressedArchive, err := archive.DecompressStream(tarArchive)
|
decompressedArchive, err := archive.DecompressStream(tarArchive)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/containers/storage/pkg/archive"
|
"github.com/containers/storage/pkg/archive"
|
||||||
)
|
)
|
||||||
|
|
||||||
func invokeUnpack(decompressedArchive io.ReadCloser,
|
func invokeUnpack(decompressedArchive io.Reader,
|
||||||
dest string,
|
dest string,
|
||||||
options *archive.TarOptions, root string) error {
|
options *archive.TarOptions, root string) error {
|
||||||
return archive.Unpack(decompressedArchive, dest, options)
|
return archive.Unpack(decompressedArchive, dest, options)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ func chroot(path string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func invokeUnpack(decompressedArchive io.ReadCloser,
|
func invokeUnpack(decompressedArchive io.Reader,
|
||||||
dest string,
|
dest string,
|
||||||
options *archive.TarOptions, root string) error {
|
options *archive.TarOptions, root string) error {
|
||||||
// Windows is different to Linux here because Windows does not support
|
// Windows is different to Linux here because Windows does not support
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue