From 44457f8e37910a74942ea1e08070480100922cc2 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Tue, 28 Oct 2014 08:53:44 -0400 Subject: [PATCH] Fix write locations for konsole's files QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation apparently doesn't include an / at the end. --- src/ColorSchemeManager.cpp | 2 +- src/KeyboardTranslatorManager.cpp | 2 +- src/ProfileWriter.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ColorSchemeManager.cpp b/src/ColorSchemeManager.cpp index 1d7fa86f6..ecba2162d 100644 --- a/src/ColorSchemeManager.cpp +++ b/src/ColorSchemeManager.cpp @@ -309,7 +309,7 @@ void ColorSchemeManager::addColorScheme(ColorScheme* scheme) // save changes to disk - const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("konsole/"); + const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/konsole/"); QDir().mkpath(dir); const QString path = dir + scheme->name() + QStringLiteral(".colorscheme"); KConfig config(path , KConfig::NoGlobals); diff --git a/src/KeyboardTranslatorManager.cpp b/src/KeyboardTranslatorManager.cpp index b5d42b0bc..d6f7e05ca 100644 --- a/src/KeyboardTranslatorManager.cpp +++ b/src/KeyboardTranslatorManager.cpp @@ -126,7 +126,7 @@ const KeyboardTranslator* KeyboardTranslatorManager::findTranslator(const QStrin bool KeyboardTranslatorManager::saveTranslator(const KeyboardTranslator* translator) { - const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("konsole/"); + const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/konsole/"); QDir().mkpath(dir); const QString path = dir + translator->name() + QStringLiteral(".keytab"); diff --git a/src/ProfileWriter.cpp b/src/ProfileWriter.cpp index 4b548ae71..3b6da01ab 100644 --- a/src/ProfileWriter.cpp +++ b/src/ProfileWriter.cpp @@ -40,7 +40,7 @@ static const char GENERAL_GROUP[] = "General"; QString KDE4ProfileWriter::getPath(const Profile::Ptr profile) { // both location have trailing slash - static const QString localDataLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("konsole/"); + static const QString localDataLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/konsole/"); static const QString systemDataLocation = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).last() + QStringLiteral("konsole/"); const QString candidateLocalPath = localDataLocation + profile->untranslatedName() + ".profile";