handle better a startup where a config cannot be loaded

ticket #2003


SVN revision: 81163
This commit is contained in:
Mike Blumenkrantz 2012-12-17 16:12:32 +00:00
parent 46f630f103
commit f0965845b5
1 changed files with 19 additions and 9 deletions

View File

@ -1069,15 +1069,25 @@ e_config_load(void)
}
if (!e_config)
{
ERR("EEEK! no config of any sort! abort abort abort!");
e_error_message_show("Enlightenment was started without any configuration\n"
"files available for the given profile (normally\n"
"default or the last profile used or provided on the\n"
"command-line with -profile etc.)\n\n"
"Cannot contiue without configuration to work with.\n"
"Please ensure you have system or user configuration\n"
"for the profile you are using before proceeeding.");
abort();
E_Action *a;
e_config_profile_set("default");
e_config_profile_del(e_config_profile_get());
e_config_save_block_set(1);
a = e_action_find("restart");
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
else
{
ERR("EEEK! no config of any sort! abort abort abort!");
e_error_message_show("Enlightenment was started without any configuration\n"
"files available for the given profile (normally\n"
"default or the last profile used or provided on the\n"
"command-line with -profile etc.)\n\n"
"Cannot contiue without configuration to work with.\n"
"Please ensure you have system or user configuration\n"
"for the profile you are using before proceeeding.");
abort();
}
}
if (e_config->config_version < E_CONFIG_FILE_VERSION)
{