summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <c.bail@partner.samsung.com>2014-06-10 00:16:08 +0200
committerCedric BAIL <c.bail@partner.samsung.com>2014-06-10 00:17:51 +0200
commit89d95d22bda14801f11e74b4bf932e208a71d1f8 (patch)
tree26eb93552b6d6b14976aa433d2d01d7578cebef0
parent7b8c5ed103682e9d3035f284ad86fb51611c7608 (diff)
downloadelementary-89d95d22bda14801f11e74b4bf932e208a71d1f8.tar.gz
config: always create a themes directory for user.
This make it more logical as it is part of Elementary config, so it should be elementary duty to create that directory. @fix
-rw-r--r--src/lib/elm_config.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index e3c8db633..68edc0822 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -1434,6 +1434,16 @@ _config_user_load(void)
cfg = eet_data_read(ef, _config_edd, "config");
eet_close(ef);
}
+
+ if (cfg)
+ {
+ size_t len;
+
+ len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
+ if (len + 1 < sizeof(buf))
+ ecore_file_mkpath(buf);
+ }
+
return cfg;
}
@@ -1717,6 +1727,18 @@ _elm_config_save(void)
Eet_File *ef;
size_t len;
+ len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
+ if (len + 1 >= sizeof(buf))
+ return EINA_FALSE;
+
+ ok = ecore_file_mkpath(buf);
+ if (!ok)
+ {
+ ERR("Problem accessing Elementary's user configuration directory: %s",
+ buf);
+ return EINA_FALSE;
+ }
+
len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s",
_elm_profile);
if (len + 1 >= sizeof(buf))