summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-125
-rw-r--r--ChangeLog.pre-2-65
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--glib/gutils.c8
6 files changed, 32 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9873505a8..6cab3af63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-15 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gutils.c (g_get_any_init): [Win32] Only believe HOME if it
+ is an absolute path and exists. (#138618)
+
2004-05-14 Tor Lillqvist <tml@iki.fi>
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 9873505a8..6cab3af63 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2004-05-15 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gutils.c (g_get_any_init): [Win32] Only believe HOME if it
+ is an absolute path and exists. (#138618)
+
2004-05-14 Tor Lillqvist <tml@iki.fi>
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 9873505a8..6cab3af63 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,8 @@
+2004-05-15 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gutils.c (g_get_any_init): [Win32] Only believe HOME if it
+ is an absolute path and exists. (#138618)
+
2004-05-14 Tor Lillqvist <tml@iki.fi>
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 9873505a8..6cab3af63 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,8 @@
+2004-05-15 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gutils.c (g_get_any_init): [Win32] Only believe HOME if it
+ is an absolute path and exists. (#138618)
+
2004-05-14 Tor Lillqvist <tml@iki.fi>
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 9873505a8..6cab3af63 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
+2004-05-15 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gutils.c (g_get_any_init): [Win32] Only believe HOME if it
+ is an absolute path and exists. (#138618)
+
2004-05-14 Tor Lillqvist <tml@iki.fi>
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
diff --git a/glib/gutils.c b/glib/gutils.c
index 90e83d37c..90bc9f2c9 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -867,7 +867,13 @@ g_get_any_init (void)
/* We check $HOME first for Win32, though it is a last resort for Unix
* where we prefer the results of getpwuid().
*/
- g_home_dir = g_strdup (g_getenv ("HOME"));
+ {
+ gchar *home = g_getenv ("HOME");
+
+ /* Only believe HOME if it is an absolute path and exists */
+ if (g_path_is_absolute (home) && g_file_test (home, G_FILE_TEST_IS_DIR))
+ g_home_dir = g_strdup (home);
+ }
/* In case HOME is Unix-style (it happens), convert it to
* Windows style.