mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Rewrite FileSearch and improve ScanDirectoryTree.
- FileSearch is now just one function, and it converts the original glob into a regex on all platforms rather than relying on native Windows pattern matching on there and a complete hack elsewhere. It now supports recursion out of the box rather than manually expanding into a full list of directories in multiple call sites. - This adds a GCC >= 4.9 dependency due to older versions having outright broken <regex>. MSVC is fine with it. - ScanDirectoryTree returns the parent entry rather than filling parts of it in via reference. The count is now stored in the entry like it was for subdirectories. - .glsl file search is now done with DoFileSearch. - IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the results after replacements for better determinism.
This commit is contained in:
@ -67,9 +67,8 @@ void CWiiSaveCrypted::ExportAllSaves()
|
||||
const u32 path_mask = 0x00010000;
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
File::FSTEntry fst_tmp;
|
||||
std::string folder = StringFromFormat("%s/%08x/", title_folder.c_str(), path_mask | i);
|
||||
File::ScanDirectoryTree(folder, fst_tmp);
|
||||
File::FSTEntry fst_tmp = File::ScanDirectoryTree(folder, false);
|
||||
|
||||
for (const File::FSTEntry& entry : fst_tmp.children)
|
||||
{
|
||||
@ -627,8 +626,7 @@ void CWiiSaveCrypted::ScanForFiles(const std::string& save_directory, std::vecto
|
||||
file_list.push_back(directories[i]);
|
||||
}
|
||||
|
||||
File::FSTEntry fst_tmp;
|
||||
File::ScanDirectoryTree(directories[i], fst_tmp);
|
||||
File::FSTEntry fst_tmp = File::ScanDirectoryTree(directories[i], false);
|
||||
for (const File::FSTEntry& elem : fst_tmp.children)
|
||||
{
|
||||
if (elem.virtualName != "banner.bin")
|
||||
|
Reference in New Issue
Block a user