Qt: Add game list excluded folders as well as files

Backport of https://github.com/PCSX2/pcsx2/pull/9730
This commit is contained in:
Stenzek committed 2024-05-05 22:29:26 +10:00
1 parent 4ca7753720
commit ffb5682b43
6 files changed
+72 -6

No files matched your search

+2 -1
View File
@@ -479,7 +479,8 @@ void GameList::DeleteCacheFile()
static bool IsPathExcluded(const std::vector<std::string>& excluded_paths, const std::string& path)
{
return (std::find(excluded_paths.begin(), excluded_paths.end(), path) != excluded_paths.end());
return std::find_if(excluded_paths.begin(), excluded_paths.end(),
[&path](const std::string& entry) { return path.starts_with(entry); }) != excluded_paths.end();
}
void GameList::ScanDirectory(const char* path, bool recursive, bool only_cache,