blob: 97cc7c1d76d75b9f53aca14cad369cda326bf369 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From 7283e2698d1fcd9aba2e4e1de1b24ed13425e2f5 Mon Sep 17 00:00:00 2001
From: Michail Vourlakos <mvourlakos@gmail.com>
Date: Sun, 24 Feb 2019 13:10:04 +0200
Subject: 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 73cb740..97abed1 100644
--- a/app/layoutmanager.cpp
+++ b/app/layoutmanager.cpp
@@ -1075,6 +1075,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);
--
cgit v1.1
|