提交 1c46eb83 编写于 作者: cocos2d-lua.org's avatar cocos2d-lua.org

关闭 win32 isFileExistInternal 中的find句柄。

上级 0a9504fd
...@@ -120,7 +120,10 @@ bool FileUtilsWin32::isFileExistInternal(const std::string& strFilePath) const ...@@ -120,7 +120,10 @@ bool FileUtilsWin32::isFileExistInternal(const std::string& strFilePath) const
else else
{ {
WIN32_FIND_DATAA ffd; WIN32_FIND_DATAA ffd;
HANDLE hFind = FindFirstFileA(strPath.c_str(), &ffd); HANDLE hFind = FindFirstFileA(strPath.c_str(), &ffd);
if (hFind != INVALID_HANDLE_VALUE) {
FindClose(hFind);
}
std::string filename(ffd.cFileName); std::string filename(ffd.cFileName);
size_t pos = strFilePath.find(filename); size_t pos = strFilePath.find(filename);
if (pos + filename.length() != strFilePath.length()) if (pos + filename.length() != strFilePath.length())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册