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)
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)
1434 cfg = eet_data_read(ef, _config_edd, "config"); 1434 cfg = eet_data_read(ef, _config_edd, "config");
1435 eet_close(ef); 1435 eet_close(ef);
1436 } 1436 }
1437
1438 if (cfg)
1439 {
1440 size_t len;
1441
1442 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
1443 if (len + 1 < sizeof(buf))
1444 ecore_file_mkpath(buf);
1445 }
1446
1437 return cfg; 1447 return cfg;
1438} 1448}
1439 1449
@@ -1717,6 +1727,18 @@ _elm_config_save(void)
1717 Eet_File *ef; 1727 Eet_File *ef;
1718 size_t len; 1728 size_t len;
1719 1729
1730 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
1731 if (len + 1 >= sizeof(buf))
1732 return EINA_FALSE;
1733
1734 ok = ecore_file_mkpath(buf);
1735 if (!ok)
1736 {
1737 ERR("Problem accessing Elementary's user configuration directory: %s",
1738 buf);
1739 return EINA_FALSE;
1740 }
1741
1720 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", 1742 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s",
1721 _elm_profile); 1743 _elm_profile);
1722 if (len + 1 >= sizeof(buf)) 1744 if (len + 1 >= sizeof(buf))