diff --git a/pcsx2/GameList.cpp b/pcsx2/GameList.cpp index d271f3e8c55e7..1e7c979ae042f 100644 --- a/pcsx2/GameList.cpp +++ b/pcsx2/GameList.cpp @@ -582,7 +582,7 @@ void GameList::RewriteCacheFile() static bool IsPathExcluded(const std::vector& excluded_paths, const std::string& path) { - return std::find_if(excluded_paths.begin(), excluded_paths.end(), [&path](const std::string& entry) { return path.starts_with(entry); }) != excluded_paths.end(); + return std::find_if(excluded_paths.begin(), excluded_paths.end(), [&path](const std::string& entry) { return !entry.empty() && path.starts_with(entry); }) != excluded_paths.end(); } void GameList::ScanDirectory(const char* path, bool recursive, bool only_cache, const std::vector& excluded_paths,