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,10 +73,12 @@ 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));
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
}
|
}
|
||||||
|
@ -94,10 +96,12 @@ 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);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue