Fix regression when TMPDIR/TMP are unset

We should just be returning /tmp as a default, not calling g_getenv
("/tmp") which makes no sense.

https://bugzilla.gnome.org/show_bug.cgi?id=672329
This commit is contained in:
Colin Walters 2012-08-22 14:48:41 -04:00
parent ad20e074c4
commit 0b6fdff05c

View File

@ -696,7 +696,7 @@ g_get_any_init_do (void)
if (g_tmp_dir == NULL || *g_tmp_dir == '\0') if (g_tmp_dir == NULL || *g_tmp_dir == '\0')
{ {
g_free (g_tmp_dir); g_free (g_tmp_dir);
g_tmp_dir = g_strdup (g_getenv ("/tmp")); g_tmp_dir = g_strdup ("/tmp");
} }
#endif /* !G_OS_WIN32 */ #endif /* !G_OS_WIN32 */