eina tmp get - support other tmp dir env vars and dont use xdg runtime 33/92933/2
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 8 Apr 2016 02:03:44 +0000 (11:03 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 21 Oct 2016 02:29:10 +0000 (19:29 -0700)
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

Change-Id: I4fa9e50f9d731c8297f5b0f16314f5193b17e2af

src/lib/eina/eina_util.c

index 0adc412..62e1a79 100644 (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";