summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2010-12-09 13:41:22 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2010-12-09 13:41:22 +0000
commitea7834865ea8da78d98603841932e6764aaeae58 (patch)
tree4d9d228722085bd54b217a957b5bcd3f447815a5 /legacy
parente88061b9aa6f7d86e5f71e867e139b63297f5e65 (diff)
revert crazy idea
SVN revision: 55413
Diffstat (limited to 'legacy')
-rw-r--r--legacy/efreet/src/lib/efreet_cache.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c
index b890ac0f51..dae2fe7df7 100644
--- a/legacy/efreet/src/lib/efreet_cache.c
+++ b/legacy/efreet/src/lib/efreet_cache.c
@@ -217,12 +217,11 @@ efreet_icon_cache_file(void)
217EAPI const char * 217EAPI const char *
218efreet_icon_theme_cache_file(void) 218efreet_icon_theme_cache_file(void)
219{ 219{
220 char *tmp; 220 char tmp[PATH_MAX] = { '\0' };
221 221
222 if (icon_theme_cache_file) return icon_theme_cache_file; 222 if (icon_theme_cache_file) return icon_theme_cache_file;
223 223
224 tmp = alloca(PATH_MAX); 224 snprintf(tmp, sizeof(tmp), "%s/efreet/icon_themes_%s.eet",
225 snprintf(tmp, PATH_MAX, "%s/efreet/icon_themes_%s.eet",
226 efreet_cache_home_get(), efreet_hostname_get()); 225 efreet_cache_home_get(), efreet_hostname_get());
227 icon_theme_cache_file = eina_stringshare_add(tmp); 226 icon_theme_cache_file = eina_stringshare_add(tmp);
228 227
@@ -258,25 +257,24 @@ efreet_version_edd(void)
258EAPI const char * 257EAPI const char *
259efreet_desktop_cache_file(void) 258efreet_desktop_cache_file(void)
260{ 259{
261 char *tmp; 260 char tmp[PATH_MAX] = { '\0' };
262 const char *cache, *lang, *country, *modifier; 261 const char *cache, *lang, *country, *modifier;
263 262
264 if (desktop_cache_file) return desktop_cache_file; 263 if (desktop_cache_file) return desktop_cache_file;
265 264
266 tmp = alloca(PATH_MAX);
267 cache = efreet_cache_home_get(); 265 cache = efreet_cache_home_get();
268 lang = efreet_lang_get(); 266 lang = efreet_lang_get();
269 country = efreet_lang_country_get(); 267 country = efreet_lang_country_get();
270 modifier = efreet_lang_modifier_get(); 268 modifier = efreet_lang_modifier_get();
271 269
272 if (lang && country && modifier) 270 if (lang && country && modifier)
273 snprintf(tmp, PATH_MAX, "%s/efreet/desktop_%s_%s_%s@%s.eet", cache, efreet_hostname_get(), lang, country, modifier); 271 snprintf(tmp, sizeof(tmp), "%s/efreet/desktop_%s_%s_%s@%s.eet", cache, efreet_hostname_get(), lang, country, modifier);
274 else if (lang && country) 272 else if (lang && country)
275 snprintf(tmp, PATH_MAX, "%s/efreet/desktop_%s_%s_%s.eet", cache, efreet_hostname_get(), lang, country); 273 snprintf(tmp, sizeof(tmp), "%s/efreet/desktop_%s_%s_%s.eet", cache, efreet_hostname_get(), lang, country);
276 else if (lang) 274 else if (lang)
277 snprintf(tmp, PATH_MAX, "%s/efreet/desktop_%s_%s.eet", cache, efreet_hostname_get(), lang); 275 snprintf(tmp, sizeof(tmp), "%s/efreet/desktop_%s_%s.eet", cache, efreet_hostname_get(), lang);
278 else 276 else
279 snprintf(tmp, PATH_MAX, "%s/efreet/desktop_%s.eet", cache, efreet_hostname_get()); 277 snprintf(tmp, sizeof(tmp), "%s/efreet/desktop_%s.eet", cache, efreet_hostname_get());
280 278
281 desktop_cache_file = eina_stringshare_add(tmp); 279 desktop_cache_file = eina_stringshare_add(tmp);
282 return desktop_cache_file; 280 return desktop_cache_file;
@@ -288,12 +286,11 @@ efreet_desktop_cache_file(void)
288EAPI const char * 286EAPI const char *
289efreet_desktop_cache_dirs(void) 287efreet_desktop_cache_dirs(void)
290{ 288{
291 char *tmp; 289 char tmp[PATH_MAX] = { '\0' };
292 290
293 if (desktop_cache_dirs) return desktop_cache_dirs; 291 if (desktop_cache_dirs) return desktop_cache_dirs;
294 292
295 tmp = alloca(PATH_MAX); 293 snprintf(tmp, sizeof(tmp), "%s/efreet/desktop_dirs.cache", efreet_cache_home_get());
296 snprintf(tmp, PATH_MAX, "%s/efreet/desktop_dirs.cache", efreet_cache_home_get());
297 294
298 desktop_cache_dirs = eina_stringshare_add(tmp); 295 desktop_cache_dirs = eina_stringshare_add(tmp);
299 return desktop_cache_dirs; 296 return desktop_cache_dirs;