summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/efreet/efreet_base.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
index 22217bafc3..26346e0a65 100644
--- a/src/lib/efreet/efreet_base.c
+++ b/src/lib/efreet/efreet_base.c
@@ -303,7 +303,19 @@ efreet_dirs_init(void)
303 xdg_config_dirs = efreet_dirs_get("XDG_CONFIG_DIRS", "/etc/xdg"); 303 xdg_config_dirs = efreet_dirs_get("XDG_CONFIG_DIRS", "/etc/xdg");
304 304
305 /* xdg_runtime_dir */ 305 /* xdg_runtime_dir */
306 xdg_runtime_dir = efreet_dir_get("XDG_RUNTIME_DIR", "/tmp"); 306 xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
307 if (!xdg_runtime_dir)
308 {
309 snprintf(buf, sizeof(buf), "/tmp/xdg-XXXXXX");
310 xdg_runtime_dir = mkdtemp(buf);
311 if (!xdg_runtime_dir)
312 {
313 perror("efreet mkdtemp");
314 xdg_runtime_dir = "/tmp";
315 }
316 }
317 xdg_runtime_dir = eina_stringshare_add(xdg_runtime_dir);
318
307 if (stat(xdg_runtime_dir, &st) == -1) 319 if (stat(xdg_runtime_dir, &st) == -1)
308 { 320 {
309 ERR("$XDG_RUNTIME_DIR did not exist, creating '%s' (breaks spec)", 321 ERR("$XDG_RUNTIME_DIR did not exist, creating '%s' (breaks spec)",