diff options
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 193c6a35..b86e2289 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -32,6 +32,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QDirIterator> #include <QLineEdit> #include <QMessageBox> +#include <QApplication> #include <QRegExp> #include <QDir> @@ -701,10 +702,15 @@ void Settings::PathsTab::update() settingsKey = QString("Settings/%1").arg(settingsKey); QString realPath = path; - realPath.replace("%BASE_DIR%", m_parent->getBaseDirectory()); + realPath.replace("%BASE_DIR%", m_baseDirEdit->text()); if (!QDir(realPath).exists()) { - QDir().mkpath(realPath); + if (!QDir().mkpath(realPath)) { + QMessageBox::warning(qApp->activeWindow(), tr("Error"), + tr("Failed to create \"%1\", you may not have the " + "necessary permission. path remains unchanged.") + .arg(realPath)); + } } if (QFileInfo(realPath) |
