diff options
| author | Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> | 2024-06-08 07:56:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 07:56:25 +0200 |
| commit | 3d18f0cd38dc8b7dc980772f986944e5f9327dba (patch) | |
| tree | 97d527122e86b94cd87f9d29521caef3289d0e6b | |
| parent | a11617ff65f8570e7c33db420c207ef304529322 (diff) | |
Only list instance directory with a MO INI file (#1965)
| -rw-r--r-- | src/instancemanager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/instancemanager.cpp b/src/instancemanager.cpp index ce3fb790..90e9e519 100644 --- a/src/instancemanager.cpp +++ b/src/instancemanager.cpp @@ -565,15 +565,17 @@ QString InstanceManager::iniPath(const QString& instanceDir) const std::vector<QString> InstanceManager::globalInstancePaths() const { - const std::set<QString> ignore = {"cache", "qtwebengine"}; - const QDir root(globalInstancesRootPath()); const auto dirs = root.entryList(QDir::Dirs | QDir::NoDotAndDotDot); std::vector<QString> list; for (auto&& d : dirs) { - if (!ignore.contains(QFileInfo(d).fileName().toLower())) { + const QFileInfo iniFile(QDir(root.filePath(d)), "ModOrganizer.ini"); + log::debug("Checking for INI at path '{}'", iniFile.absoluteFilePath()); + + if (iniFile.exists()) { + log::debug("Found INI at path '{}'", iniFile.absoluteFilePath()); list.push_back(root.filePath(d)); } } |
