diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index 13e99fe88a..b5395cf21c 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -28,7 +28,8 @@ static std::vector FileSearchWithTest(const std::vector DoFileSearch(const std::vector& globs, con }); } +// Result includes the passed directories themselves as well as their subdirectories. std::vector FindSubdirectories(const std::vector& directories, bool recursive) { return FileSearchWithTest(directories, true, [&](const File::FSTEntry& entry) { diff --git a/Source/Core/DolphinQt/GameList/GameTracker.cpp b/Source/Core/DolphinQt/GameList/GameTracker.cpp index 8bb41c39aa..7213024fe1 100644 --- a/Source/Core/DolphinQt/GameList/GameTracker.cpp +++ b/Source/Core/DolphinQt/GameList/GameTracker.cpp @@ -80,16 +80,13 @@ void DGameTracker::ScanForGames() delete m_watcher; m_watcher = new QFileSystemWatcher(this); + for (std::string dir : SConfig::GetInstance().m_ISOFolder) + m_watcher->addPath(QString::fromStdString(dir)); if (SConfig::GetInstance().m_RecursiveISOFolder) { for (std::string dir : FindSubdirectories(SConfig::GetInstance().m_ISOFolder, /*recursive*/ true)) m_watcher->addPath(QString::fromStdString(dir)); } - else - { - for (std::string dir : SConfig::GetInstance().m_ISOFolder) - m_watcher->addPath(QString::fromStdString(dir)); - } std::vector exts; if (SConfig::GetInstance().m_ListGC)