Merge pull request #2313 from hanwen-flow/file-close

pkg/archive: catch file Close() error
This commit is contained in:
openshift-merge-bot[bot] 2025-04-10 09:18:06 +00:00 committed by GitHub
commit f01643a253
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -705,7 +705,9 @@ func extractTarFileEntry(path, extractDir string, hdr *tar.Header, reader io.Rea
file.Close()
return err
}
file.Close()
if err := file.Close(); err != nil {
return err
}
case tar.TypeBlock, tar.TypeChar:
if inUserns { // cannot create devices in a userns