From d59147e308eb62a66c3fa3951944ea7fb898fe9b Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 15 Jul 1998 17:11:15 +0000 Subject: [PATCH] feature TMPDIR env variable. --- glib/gutils.c | 4 +++- gutils.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/glib/gutils.c b/glib/gutils.c index 80e2ddb..19271fa 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -189,7 +189,9 @@ g_get_any_init (void) { struct passwd *pw; - g_tmp_dir = g_strdup (getenv ("TMP")); + g_tmp_dir = g_strdup (getenv ("TMPDIR")); + if (!g_tmp_dir) + g_tmp_dir = g_strdup (getenv ("TMP")); if (!g_tmp_dir) g_tmp_dir = g_strdup (getenv ("TEMP")); if (!g_tmp_dir) diff --git a/gutils.c b/gutils.c index 80e2ddb..19271fa 100644 --- a/gutils.c +++ b/gutils.c @@ -189,7 +189,9 @@ g_get_any_init (void) { struct passwd *pw; - g_tmp_dir = g_strdup (getenv ("TMP")); + g_tmp_dir = g_strdup (getenv ("TMPDIR")); + if (!g_tmp_dir) + g_tmp_dir = g_strdup (getenv ("TMP")); if (!g_tmp_dir) g_tmp_dir = g_strdup (getenv ("TEMP")); if (!g_tmp_dir) -- 2.7.4