forked from enlightenment/efl
efreet: Create cache dir in efreet_cache_init
efreetd used efreet functions before efreet init which fails.
This commit is contained in:
parent
58fc3a8f32
commit
ebcd97cc93
|
@ -494,7 +494,6 @@ Eina_Bool
|
|||
cache_init(void)
|
||||
{
|
||||
char **argv;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
ecore_app_args_get(NULL, &argv);
|
||||
|
||||
|
@ -505,13 +504,6 @@ cache_init(void)
|
|||
PACKAGE_DATA_DIR,
|
||||
PACKAGE_DATA_DIR);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/efreet", efreet_cache_home_get());
|
||||
if (!ecore_file_mkpath(buf))
|
||||
{
|
||||
ERR("Failed to create directory '%s'", buf);
|
||||
goto error;
|
||||
}
|
||||
|
||||
cache_exe_del_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
|
||||
cache_exe_del_cb, NULL);
|
||||
if (!cache_exe_del_handler)
|
||||
|
|
|
@ -111,6 +111,8 @@ EAPI int EFREET_EVENT_DESKTOP_CACHE_BUILD = 0;
|
|||
int
|
||||
efreet_cache_init(void)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
_efreet_cache_log_dom = eina_log_domain_register("efreet_cache", EFREET_DEFAULT_LOG_COLOR);
|
||||
if (_efreet_cache_log_dom < 0)
|
||||
return 0;
|
||||
|
@ -121,6 +123,13 @@ efreet_cache_init(void)
|
|||
goto error;
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/efreet", efreet_cache_home_get());
|
||||
if (!ecore_file_mkpath(buf))
|
||||
{
|
||||
ERR("Failed to create directory '%s'", buf);
|
||||
}
|
||||
|
||||
|
||||
EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
|
||||
EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new();
|
||||
EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new();
|
||||
|
|
Loading…
Reference in New Issue