summaryrefslogtreecommitdiff
path: root/src/lib/efreet/efreet_cache.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-06-21 10:00:20 +0200
committerSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-06-21 10:00:20 +0200
commitebcd97cc938851352642eb42e3c5bc43ee288631 (patch)
tree9437633f5b3bd8cbdd3c370a21decb7ff11d19ad /src/lib/efreet/efreet_cache.c
parent58fc3a8f32d6fe71910ee0479afc3c8478c12540 (diff)
efreet: Create cache dir in efreet_cache_init
efreetd used efreet functions before efreet init which fails.
Diffstat (limited to '')
-rw-r--r--src/lib/efreet/efreet_cache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
index 8af3780158..9c2eaf6654 100644
--- a/src/lib/efreet/efreet_cache.c
+++ b/src/lib/efreet/efreet_cache.c
@@ -111,6 +111,8 @@ EAPI int EFREET_EVENT_DESKTOP_CACHE_BUILD = 0;
111int 111int
112efreet_cache_init(void) 112efreet_cache_init(void)
113{ 113{
114 char buf[PATH_MAX];
115
114 _efreet_cache_log_dom = eina_log_domain_register("efreet_cache", EFREET_DEFAULT_LOG_COLOR); 116 _efreet_cache_log_dom = eina_log_domain_register("efreet_cache", EFREET_DEFAULT_LOG_COLOR);
115 if (_efreet_cache_log_dom < 0) 117 if (_efreet_cache_log_dom < 0)
116 return 0; 118 return 0;
@@ -121,6 +123,13 @@ efreet_cache_init(void)
121 goto error; 123 goto error;
122 } 124 }
123 125
126 snprintf(buf, sizeof(buf), "%s/efreet", efreet_cache_home_get());
127 if (!ecore_file_mkpath(buf))
128 {
129 ERR("Failed to create directory '%s'", buf);
130 }
131
132
124 EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new(); 133 EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
125 EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new(); 134 EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new();
126 EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new(); 135 EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new();