This commit is contained in:
parent
28995790cc
commit
9b5779799f
@ -98,7 +98,6 @@ func extractFiles(gzipStream io.Reader, dest string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer uncompressedStream.Close()
|
||||
|
||||
tarReader := tar.NewReader(uncompressedStream)
|
||||
@ -112,6 +111,12 @@ func extractFiles(gzipStream io.Reader, dest string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Handle pax_global_header or other unsupported types
|
||||
if header.Typeflag == tar.TypeXGlobalHeader || header.Name == "pax_global_header" {
|
||||
// Skip this special header file
|
||||
continue
|
||||
}
|
||||
|
||||
filePath := filepath.Join(dest, header.Name)
|
||||
|
||||
switch header.Typeflag {
|
||||
@ -124,7 +129,6 @@ func extractFiles(gzipStream io.Reader, dest string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := io.Copy(outFile, tarReader); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user