config_data: create config home folder if it doesn't exist.

previously, user home config folder was not existed,
enventor config file won't be saved.

now, it's fixed.

@fix
This commit is contained in:
ChunEon Park 2015-08-25 16:24:32 +09:00
parent 37a029102b
commit c5ccf94fea
1 changed files with 13 additions and 1 deletions

View File

@ -75,9 +75,21 @@ static void
config_save(config_data *cd)
{
char buf[PATH_MAX];
//Create config home directory if it doesn't exist.
if (!ecore_file_exists(efreet_config_home_get()))
{
Eina_Bool success = ecore_file_mkdir(efreet_config_home_get());
if (!success)
{
EINA_LOG_ERR("Cannot create a config folder \"%s\"", efreet_config_home_get());
return;
}
}
snprintf(buf, sizeof(buf), "%s/enventor", efreet_config_home_get());
//Create config folder if it doesn't exist.
//Create enventor config folder if it doesn't exist.
if (!ecore_file_exists(buf))
{
Eina_Bool success = ecore_file_mkdir(buf);