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
2024-05-05 22:11:03 +10:00
parent 4ca7753720
commit ffb5682b43
6 changed files with 72 additions and 6 deletions

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,