forked from enlightenment/efl
Eina file: Fix calls to getenv
There seems to be an intent to check that UID==EUID before calling getenv to get the temp directory. But that was lost in commits61478af3a6
and then ine105abc99e
.
This commit is contained in:
parent
fc54d85251
commit
03cc403228
|
@ -908,8 +908,10 @@ eina_file_mkstemp(const char *templatename, Eina_Tmpstr **path)
|
|||
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
|
||||
if (getuid() == geteuid())
|
||||
#endif
|
||||
tmpdir = getenv("TMPDIR");
|
||||
if (!tmpdir) tmpdir = getenv("XDG_RUNTIME_DIR");
|
||||
{
|
||||
tmpdir = getenv("TMPDIR");
|
||||
if (!tmpdir) tmpdir = getenv("XDG_RUNTIME_DIR");
|
||||
}
|
||||
if (!tmpdir) tmpdir = "/tmp";
|
||||
#else
|
||||
tmpdir = (char *)evil_tmpdir_get();
|
||||
|
|
Loading…
Reference in New Issue