diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index 167f6b9c26..87d5a5f3d8 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -153,6 +154,20 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog() if (!setupLauncherSettings()) return FirstRunDialogResultFailure; + // Dialog wizard and setup will fail if the config directory does not already exist + QDir userConfigDir = QDir(QString::fromStdString(mCfgMgr.getUserConfigPath().string())); + if ( ! userConfigDir.exists() ) { + if ( ! userConfigDir.mkpath(".") ) + { + cfgError(tr("Error opening OpenMW configuration file"), + tr("
Could not create directory %0

\ + Please make sure you have the right permissions \ + and try again.
").arg(userConfigDir.canonicalPath()) + ); + return FirstRunDialogResultFailure; + } + } + if (mLauncherSettings.value(QString("General/firstrun"), QString("true")) == QLatin1String("true")) { QMessageBox msgBox;