summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorTannin <sherb@gmx.net>2016-06-23 21:00:46 +0200
committerTannin <sherb@gmx.net>2016-06-23 21:00:46 +0200
commit8a3af93b39b05b95462869fc7df7169c5862c966 (patch)
tree450d2e663e6224f7e57d95655fca5fddd8416c1b /src/settings.cpp
parent352975e757f5e68e1e1d2738ab0cb2e9ac5b31dc (diff)
fixed creation of data paths after changing paths in settings and update of profile list after change
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp10
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)