1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-23 04:27:03 +00:00

storage test: fix failures on windows (#457)

* storage test: close source reader
* fstore: properly close directory handle
This commit is contained in:
James Hillyerd
2023-12-12 19:31:14 -08:00
committed by GitHub
parent e6e4e0987d
commit 5a5864fde6
2 changed files with 26 additions and 24 deletions

View File

@@ -326,5 +326,9 @@ func readDirNames(elem ...string) ([]string, error) {
if err != nil {
return nil, err
}
defer func() {
_ = f.Close()
}()
return f.Readdirnames(0)
}