[glib] Fix regression when TMPDIR/TMP are unset



commit 0b6fdff05cc10f5e639a39dd4b79e01a025ad2d5
Author: Colin Walters <walters verbum org>
Date:   Wed Aug 22 14:48:41 2012 -0400

    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

 glib/gutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gutils.c b/glib/gutils.c
index 38b5e44..49862ac 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -696,7 +696,7 @@ g_get_any_init_do (void)
   if (g_tmp_dir == NULL || *g_tmp_dir == '\0')
     {
       g_free (g_tmp_dir);
-      g_tmp_dir = g_strdup (g_getenv ("/tmp"));
+      g_tmp_dir = g_strdup ("/tmp");
     }
 #endif	/* !G_OS_WIN32 */
   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]