cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b39ad2757829d0198f9f19fe07c626f4a96068d8

commit b39ad2757829d0198f9f19fe07c626f4a96068d8
Author: Cedric BAIL <[email protected]>
Date:   Tue Jun 10 00:16:08 2014 +0200

    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
---
 src/lib/elm_config.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index e3c8db6..68edc08 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))

-- 


Reply via email to