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 {
|
||||
decompressedArchive, err := archive.DecompressStream(tarArchive)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/containers/storage/pkg/archive"
|
||||
)
|
||||
|
||||
func invokeUnpack(decompressedArchive io.ReadCloser,
|
||||
func invokeUnpack(decompressedArchive io.Reader,
|
||||
dest string,
|
||||
options *archive.TarOptions, root string) error {
|
||||
return archive.Unpack(decompressedArchive, dest, options)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ func chroot(path string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func invokeUnpack(decompressedArchive io.ReadCloser,
|
||||
func invokeUnpack(decompressedArchive io.Reader,
|
||||
dest string,
|
||||
options *archive.TarOptions, root string) error {
|
||||
// Windows is different to Linux here because Windows does not support
|
||||
|
|
|
|||
Loading…
Reference in New Issue