mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: on windows use FindClose close handler (#17306)
This commit is contained in:
parent
669acbb032
commit
043fd8b536
@ -53,7 +53,7 @@ func readDirFn(dirPath string, filter func(name string, typ os.FileMode) error)
|
||||
}
|
||||
return err
|
||||
}
|
||||
defer syscall.CloseHandle(handle)
|
||||
defer syscall.FindClose(handle)
|
||||
|
||||
for ; ; err = syscall.FindNextFile(handle, data) {
|
||||
if err != nil {
|
||||
@ -128,7 +128,7 @@ func readDirWithOpts(dirPath string, opts readDirOpts) (entries []string, err er
|
||||
return nil, syscallErrToFileErr(dirPath, err)
|
||||
}
|
||||
|
||||
defer syscall.CloseHandle(handle)
|
||||
defer syscall.FindClose(handle)
|
||||
|
||||
count := opts.count
|
||||
for ; count != 0; err = syscall.FindNextFile(handle, data) {
|
||||
|
Loading…
Reference in New Issue
Block a user