2017-06-25 18:59:23 +02:00
|
|
|
From ba2eb4be6c69ee8206e0139268c896e6a2b278d8 Mon Sep 17 00:00:00 2001
|
2016-09-18 21:35:23 +02:00
|
|
|
From: Jascha Geerds <jascha@jgeerds.name>
|
2017-06-25 18:59:23 +02:00
|
|
|
Date: Sun, 25 Jun 2017 11:50:33 +0100
|
2016-09-18 21:35:23 +02:00
|
|
|
Subject: [PATCH 3/3] Create config dir if it doesn't exist
|
|
|
|
|
|
|
|
---
|
|
|
|
gtweak/gtksettings.py | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/gtweak/gtksettings.py b/gtweak/gtksettings.py
|
2017-06-25 18:59:23 +02:00
|
|
|
index a0c163b..f5883ec 100644
|
2016-09-18 21:35:23 +02:00
|
|
|
--- a/gtweak/gtksettings.py
|
|
|
|
+++ b/gtweak/gtksettings.py
|
2017-06-25 18:59:23 +02:00
|
|
|
@@ -36,6 +36,10 @@ class GtkSettingsManager:
|
2016-09-18 21:35:23 +02:00
|
|
|
def _get_keyfile(self):
|
|
|
|
keyfile = None
|
|
|
|
try:
|
|
|
|
+ config_dir = os.path.dirname(self._path)
|
|
|
|
+ if not os.path.isdir(config_dir):
|
|
|
|
+ os.makedirs(config_dir)
|
|
|
|
+
|
|
|
|
keyfile = GLib.KeyFile()
|
|
|
|
keyfile.load_from_file(self._path, 0)
|
|
|
|
except MemoryError:
|
|
|
|
--
|
2017-06-25 18:59:23 +02:00
|
|
|
2.12.2
|
2016-09-18 21:35:23 +02:00
|
|
|
|