Better place for CloseHandle

This commit is contained in:
Henrik Rydgård committed 2019-02-25 21:48:56 +01:00
1 parent ff2c540e51
commit cb25354dce
1 file changed
+1 -1
+1 -1
View File
@@ -133,8 +133,8 @@ std::string ResolvePath(const std::string &path) {
int result = getFinalPathNameByHandleW(hFile, buf, BUF_SIZE - 1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
if (result >= BUF_SIZE || result == 0)
wcscpy_s(buf, BUF_SIZE - 1, input.c_str());
CloseHandle(hFile);
}
CloseHandle(hFile);
} else {
wchar_t *longBuf = new wchar_t[BUF_SIZE];
memset(buf, 0, BUF_SIZE);