mirror of
https://github.com/OpenMW/openmw.git
synced 2026-05-06 07:56:40 -04:00
Restore data directory root Morrowind.ini detection
This turned out to be relevant for those data directories that were generated by the wizard from a retail disc. Note the initial disc installation doesn't need to be registered as an installation because of the special case when the settings importer is run.
This commit is contained in:
@@ -239,15 +239,15 @@ void Wizard::MainWizard::addInstallation(const QString& path)
|
||||
install.hasTribunal = findFiles(QStringLiteral("Tribunal"), path);
|
||||
install.hasBloodmoon = findFiles(QStringLiteral("Bloodmoon"), path);
|
||||
|
||||
// Try to autodetect the Morrowind.ini location
|
||||
// The installation path is the Data Files directory,
|
||||
// so the INI should be located in the parent directory.
|
||||
if (dir.cdUp())
|
||||
{
|
||||
const QFile file(dir.filePath(QStringLiteral("Morrowind.ini")));
|
||||
if (file.exists())
|
||||
install.iniPath = file.fileName();
|
||||
}
|
||||
QFile file(dir.filePath(QStringLiteral("Morrowind.ini")));
|
||||
|
||||
// Try the parent directory
|
||||
// In normal Morrowind installations that's where Morrowind.ini is
|
||||
if (!file.exists() && dir.cdUp())
|
||||
file.setFileName(dir.filePath(QStringLiteral("Morrowind.ini")));
|
||||
|
||||
if (file.exists())
|
||||
install.iniPath = file.fileName();
|
||||
|
||||
mInstallations.insert(QDir::toNativeSeparators(path), install);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user