mirror of https://github.com/axmolengine/axmol.git
concat path error (#19075)
when trying to remove dir `test0`, the function will build a pattern like `"test0*.*"` rather than `test0/*.*`
This commit is contained in:
parent
11339c4545
commit
1ceb222c7f
|
@ -479,7 +479,12 @@ bool FileUtilsWin32::removeFile(const std::string &filepath) const
|
|||
|
||||
bool FileUtilsWin32::removeDirectory(const std::string& dirPath) const
|
||||
{
|
||||
std::wstring wpath = StringUtf8ToWideChar(dirPath);
|
||||
std::string dirPathCopy = dirPath;
|
||||
if (dirPath.length() > 0 && dirPath[dirPath.length() - 1] != '/' && dirPath[dirPath.length() - 1] != '\\')
|
||||
{
|
||||
dirPathCopy.append("/");
|
||||
}
|
||||
std::wstring wpath = StringUtf8ToWideChar(dirPathCopy);
|
||||
std::wstring files = wpath + L"*.*";
|
||||
WIN32_FIND_DATA wfd;
|
||||
HANDLE search = FindFirstFileEx(files.c_str(), FindExInfoStandard, &wfd, FindExSearchNameMatch, NULL, 0);
|
||||
|
|
Loading…
Reference in New Issue