mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +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>
|
2004-05-14 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
|
* 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>
|
2004-05-14 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
|
* 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>
|
2004-05-14 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
|
* 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>
|
2004-05-14 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
|
* 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>
|
2004-05-14 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/gnulib/vasnprintf.c (vasnprintf): Handle empty digit string
|
* 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
|
/* We check $HOME first for Win32, though it is a last resort for Unix
|
||||||
* where we prefer the results of getpwuid().
|
* 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
|
/* In case HOME is Unix-style (it happens), convert it to
|
||||||
* Windows style.
|
* Windows style.
|
||||||
|
Loading…
Reference in New Issue
Block a user