mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
[Win32] Only believe HOME if it is an absolute path and exists. (#138618)
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)
This commit is contained in:
parent
267009b913
commit
38bb555ce3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user