1
mirror of https://github.com/rclone/rclone synced 2024-07-27 16:38:21 +02:00

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:
Nick Craig-Wood 2019-01-29 15:23:42 +00:00
parent 7e13103ba2
commit 74297a0c55

View File

@ -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)