forked from TrueCloudLab/rclone
local: make sure we close file handle in local tests
...as Windows can't remove a directory with an open file handle in
This commit is contained in:
parent
7e13103ba2
commit
74297a0c55
1 changed files with 3 additions and 0 deletions
|
@ -47,6 +47,9 @@ func TestUpdatingCheck(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("failed opening file %q: %v", filePath, err)
|
||||
}
|
||||
defer func() {
|
||||
require.NoError(t, fd.Close())
|
||||
}()
|
||||
|
||||
fi, err := fd.Stat()
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Reference in a new issue