forked from enlightenment/efl
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
This commit is contained in:
parent
793145c4fb
commit
ffcdbf20f5
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue