mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gst/registries/gstxmlregistry.c: don't rely on g_dir_open to figure out if a file is a directory, use explicit G_TEST...
Original commit message from CVS: reviewed by Benjamin Otte <otte@gnome.org> * gst/registries/gstxmlregistry.c: (gst_xml_registry_rebuild_recurse): don't rely on g_dir_open to figure out if a file is a directory, use explicit G_TEST_IS_DIR. Reiserfs4 allows opening files as directories. (fixes #142850)
This commit is contained in:
parent
502660a784
commit
60de88e46c
2 changed files with 27 additions and 16 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-06-06 ed@catmur.co.uk
|
||||
|
||||
reviewed by Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/registries/gstxmlregistry.c:
|
||||
(gst_xml_registry_rebuild_recurse):
|
||||
don't rely on g_dir_open to figure out if a file is a directory, use
|
||||
explicit G_TEST_IS_DIR. Reiserfs4 allows opening files as
|
||||
directories. (fixes #142850)
|
||||
|
||||
2004-06-06 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/gstqueue.c: (gst_queue_dispose), (gst_queue_change_state):
|
||||
|
|
|
@ -1331,11 +1331,11 @@ static GList *
|
|||
gst_xml_registry_rebuild_recurse (GstXMLRegistry * registry,
|
||||
const gchar * directory)
|
||||
{
|
||||
GDir *dir;
|
||||
GList *ret = NULL;
|
||||
gint dr_len, sf_len;
|
||||
|
||||
dir = g_dir_open (directory, 0, NULL);
|
||||
if (g_file_test (directory, G_FILE_TEST_IS_DIR)) {
|
||||
GDir *dir = g_dir_open (directory, 0, NULL);
|
||||
|
||||
if (dir) {
|
||||
const gchar *dirent;
|
||||
|
@ -1355,6 +1355,7 @@ gst_xml_registry_rebuild_recurse (GstXMLRegistry * registry,
|
|||
g_free (dirname);
|
||||
}
|
||||
g_dir_close (dir);
|
||||
}
|
||||
} else {
|
||||
dr_len = strlen (directory);
|
||||
sf_len = strlen (G_MODULE_SUFFIX);
|
||||
|
|
Loading…
Reference in a new issue