summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2005-01-02 16:03:56 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-01-02 16:03:56 +0000
commita8cf492b2c787ab06a71f417ec6da8c63a48cf62 (patch)
tree2a5704e7f0645c45fa767c6a9656e3c62746950b
parent66f109711ab8dde782b34c25b523861369ecefbd (diff)
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)
-rw-r--r--gmodule/ChangeLog7
-rw-r--r--gmodule/gmodule.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog
index 5d5ac1f4f..40c63dc17 100644
--- a/gmodule/ChangeLog
+++ b/gmodule/ChangeLog
@@ -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 ===
diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c
index 2f72d1e34..1582c9621 100644
--- a/gmodule/gmodule.c
+++ b/gmodule/gmodule.c
@@ -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;