Commit 8117a72e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure to create directory group

parent 0869c21f
Pipeline #70642 skipped
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QDir>
#include <QFileDialog> #include <QFileDialog>
#include <QInputDialog> #include <QInputDialog>
#include <QPushButton> #include <QPushButton>
...@@ -214,6 +215,9 @@ void KDebugSettingsDialog::slotSaveAsGroup() ...@@ -214,6 +215,9 @@ void KDebugSettingsDialog::slotSaveAsGroup()
if (mLoadToolButton->groupNames().contains(trimmedName)) { if (mLoadToolButton->groupNames().contains(trimmedName)) {
KMessageBox::error(this, i18n("%1 is already used as a group name.\nPlease save as another name.", trimmedName)); KMessageBox::error(this, i18n("%1 is already used as a group name.\nPlease save as another name.", trimmedName));
} else { } else {
if (!QDir().mkpath(groupPath)) {
qCWarning(KDEBUGSETTINGS_LOG) << "Unable to create folder: " << groupPath;
}
saveRules(groupPath + QLatin1Char('/') + trimmedName, true); saveRules(groupPath + QLatin1Char('/') + trimmedName, true);
Q_EMIT updateLoadGroupMenu(); Q_EMIT updateLoadGroupMenu();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment