Close python wheel directory file descriptor after read (#753)

## Changes
Close python wheel directory file descriptor after read
This commit is contained in:
Andrew Nester 2023-09-08 13:24:51 +02:00 committed by GitHub
parent 67af171a68
commit 368321d07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ func FindFilesWithSuffixInPath(dir, suffix string) []string {
log.Debugf(context.Background(), "open dir %s: %s", dir, err)
return nil
}
defer f.Close()
entries, err := f.ReadDir(0)
if err != nil {
log.Debugf(context.Background(), "read dir %s: %s", dir, err)