timetable-extension #1

Open
fred.boniface wants to merge 160 commits from timetable-extension into main
Showing only changes of commit 9b5779799f - Show all commits

View File

@ -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
}