mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 07:35:38 +00:00
Fixed a crash when searching recursively through a directory.
This commit is contained in:
parent
0bb8737211
commit
cc87084959
|
@ -73,8 +73,10 @@ namespace Utils
|
||||||
std::string fullName(getGenericPath(path + "/" + name));
|
std::string fullName(getGenericPath(path + "/" + name));
|
||||||
contentList.push_back(fullName);
|
contentList.push_back(fullName);
|
||||||
|
|
||||||
if (_recursive && isDirectory(fullName))
|
if (_recursive && isDirectory(fullName)) {
|
||||||
|
contentList.sort();
|
||||||
contentList.merge(getDirContent(fullName, true));
|
contentList.merge(getDirContent(fullName, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (FindNextFileW(hFind, &findData));
|
while (FindNextFileW(hFind, &findData));
|
||||||
|
@ -94,8 +96,10 @@ namespace Utils
|
||||||
std::string fullName(getGenericPath(path + "/" + name));
|
std::string fullName(getGenericPath(path + "/" + name));
|
||||||
contentList.push_back(fullName);
|
contentList.push_back(fullName);
|
||||||
|
|
||||||
if (_recursive && isDirectory(fullName))
|
if (_recursive && isDirectory(fullName)) {
|
||||||
|
contentList.sort();
|
||||||
contentList.merge(getDirContent(fullName, true));
|
contentList.merge(getDirContent(fullName, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
|
Loading…
Reference in a new issue