From 5a0948591e7dcb89b46cba829a7e0f61358786dd Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 24 Feb 2019 13:10:04 +0200 Subject: [PATCH] create latte dir if missing when loading presets --this is critical because it does not open Latte at first run. The fix is just to make sure that "latte" directory will be created in case there isnt already BUG: 404762 --- app/layoutmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/layoutmanager.cpp b/app/layoutmanager.cpp index 4b942df92..cb0d8f195 100644 --- a/app/layoutmanager.cpp +++ b/app/layoutmanager.cpp @@ -1083,6 +1083,12 @@ void LayoutManager::importPresets(bool includeDefault) void LayoutManager::importPreset(int presetNo, bool newInstanceIfPresent) { + QDir configDir(QDir::homePath() + "/.config"); + + if (!QDir(configDir.absolutePath() + "/latte").exists()) { + configDir.mkdir("latte"); + } + QByteArray presetNameOrig = QString("preset" + QString::number(presetNo)).toUtf8(); QString presetPath = m_corona->kPackage().filePath(presetNameOrig); QString presetName = Layout::layoutName(presetPath);