eina tmp get - support other tmp dir env vars and dont use xdg runtime

xdg runtime dir is NOT a tmp dir in the normal sense. it's not world
writable nor world readable. only for the user.  using
eina_environment_tmp_get() would imply that it is a regular tmp dir,
not a per-user private only runtime dir. that is something else
entirely.

@fix
This commit is contained in:
Carsten Haitzler 2016-04-08 11:03:44 +09:00
parent 65bae9cd8a
commit 0e5fee0041
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,9 @@ eina_environment_tmp_get(void)
# endif
{
tmp = getenv("TMPDIR");
if (!tmp) tmp = getenv("XDG_RUNTIME_DIR");
if (!tmp) tmp = getenv("TMP");
if (!tmp) tmp = getenv("TEMPDIR");
if (!tmp) tmp = getenv("TEMP");
}
if (!tmp) tmp = "/tmp";