mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
It's wrong to call g_file_test() with more than one test (both
2004-12-31 Tor Lillqvist <tml@iki.fi> * gmodule.c (g_module_open): It's wrong to call g_file_test() with more than one test (both G_FILE_TEST_EXISTS and _IS_REGULAR). (It would succeed even if the pathname existed as a nonregular file.) Just G_FILE_TEST_IS_REGULAR works fine. (#162594)
This commit is contained in:
parent
66f109711a
commit
a8cf492b2c
@ -1,3 +1,10 @@
|
||||
2004-12-31 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gmodule.c (g_module_open): It's wrong to call g_file_test() with
|
||||
more than one test (both G_FILE_TEST_EXISTS and _IS_REGULAR). (It
|
||||
would succeed even if the pathname existed as a nonregular file.)
|
||||
Just G_FILE_TEST_IS_REGULAR works fine. (#162594)
|
||||
|
||||
2004-12-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.0 ===
|
||||
|
@ -349,13 +349,13 @@ g_module_open (const gchar *file_name,
|
||||
}
|
||||
|
||||
/* check whether we have a readable file right away */
|
||||
if (g_file_test (file_name, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
if (g_file_test (file_name, G_FILE_TEST_IS_REGULAR))
|
||||
name = g_strdup (file_name);
|
||||
/* try completing file name with standard library suffix */
|
||||
if (!name)
|
||||
{
|
||||
name = g_strconcat (file_name, "." G_MODULE_SUFFIX, NULL);
|
||||
if (!g_file_test (name, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
if (!g_file_test (name, G_FILE_TEST_IS_REGULAR))
|
||||
{
|
||||
g_free (name);
|
||||
name = NULL;
|
||||
@ -365,7 +365,7 @@ g_module_open (const gchar *file_name,
|
||||
if (!name)
|
||||
{
|
||||
name = g_strconcat (file_name, ".la", NULL);
|
||||
if (!g_file_test (name, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
|
||||
if (!g_file_test (name, G_FILE_TEST_IS_REGULAR))
|
||||
{
|
||||
g_free (name);
|
||||
name = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user