Jinoh Kang (@iamahuman) commented about dlls/kernel32/tests/file.c:
+ lstrcatA(dest, "\\hardlink"); + ret = CreateHardLinkA(dest, source, NULL); + ok(ret, "CreateHardLinkA: error %ld\n", GetLastError()); + dest[lstrlenA(dest) - 4] = 'L'; + ret = MoveFileA(source, dest); + ok(ret, "MoveFileA: error %ld\n", GetLastError()); + + hfile = FindFirstFileA(dest, &find_data); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %ld\n", GetLastError()); + if (hfile != INVALID_HANDLE_VALUE) + { + todo_wine + ok(!lstrcmpA(strrchr(dest, '\\') + 1, find_data.cFileName), + "MoveFile failed to change casing on hardlink of itself: got %s\n", find_data.cFileName); + } + CloseHandle(hfile); I know that the existing code does this, but this wrongly closes an unrelated handle instead of cleaning up hfile because hfile is actually a `FIND_FIRST_INFO *`, not a kernel handle. You need `FindClose()` to free it.
```suggestion:-0+0 FindClose(hfile); ``` Yes, the existing test is broken as I realize now. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6855#note_88538