diff options
| author | Silarn <jrim@rimpo.org> | 2019-07-08 13:22:25 -0500 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-07-08 13:22:25 -0500 |
| commit | 2b213fe7ce4b75afd6f7d6418d3ccd2cf6f55070 (patch) | |
| tree | acf00d765ca1e98c20defa209ba2bd90bb256c6f /src/main.cpp | |
| parent | d2a8890e74595b6e0ef5cd1532b3f11e02349905 (diff) | |
| parent | 4bfb1a0d7666cbde7b10f59feaccde0af723a9e1 (diff) | |
Merge branch 'Develop' into qt-5.13
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 09e27cd8..ec60b605 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -303,6 +303,11 @@ MOBase::IPluginGame *determineCurrentGame(QString const &moPath, QSettings &sett gamePath = game->gameDirectory().absolutePath(); } QDir gameDir(gamePath); + QFileInfo directoryInfo(gameDir.path()); + if (directoryInfo.isSymLink()) { + reportError(QObject::tr("The configured path to the game directory (%1) appears to be a symbolic (or other) link. " + "This setup is incompatible with MO2's VFS and will not run correctly.").arg(gamePath)); + } if (game->looksValid(gameDir)) { return selectGame(settings, gameDir, game); } @@ -335,15 +340,26 @@ MOBase::IPluginGame *determineCurrentGame(QString const &moPath, QSettings &sett while (selection.exec() != QDialog::Rejected) { IPluginGame * game = selection.getChoiceData().value<IPluginGame *>(); + QString gamePath = selection.getChoiceDescription(); + QFileInfo directoryInfo(gamePath); + if (directoryInfo.isSymLink()) { + reportError(QObject::tr("The configured path to the game directory (%1) appears to be a symbolic (or other) link. " + "This setup is incompatible with MO2's VFS and will not run correctly.").arg(gamePath)); + } if (game != nullptr) { return selectGame(settings, game->gameDirectory(), game); } - QString gamePath = QFileDialog::getExistingDirectory(nullptr, gameConfigured ? QObject::tr("Please select the installation of %1 to manage").arg(gameName) + gamePath = QFileDialog::getExistingDirectory(nullptr, gameConfigured ? QObject::tr("Please select the installation of %1 to manage").arg(gameName) : QObject::tr("Please select the game to manage"), QString(), QFileDialog::ShowDirsOnly); if (!gamePath.isEmpty()) { QDir gameDir(gamePath); + QFileInfo directoryInfo(gamePath); + if (directoryInfo.isSymLink()) { + reportError(QObject::tr("The configured path to the game directory (%1) appears to be a symbolic (or other) link. " + "This setup is incompatible with MO2's VFS and will not run correctly.").arg(gamePath)); + } QList<IPluginGame *> possibleGames; for (IPluginGame * const game : plugins.plugins<IPluginGame>()) { //If a game is already configured, skip any plugins that are not for that game |
