gst/registries/gstxmlregistry.c

Original commit message from CVS:
* gst/registries/gstxmlregistry.c
(gst_xml_registry_rebuild_recurse): Fix the algorithm to
determine if a file is a G_MODULE. The old one discards paths
containing "so" somewhere in the middle. My home directory is
called "soto". Go figure...
This commit is contained in:
Martin Soto 2004-04-01 18:28:44 +00:00
parent 456bfef89d
commit 73b88d064e
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2004-04-01 Martin Soto <martinsoto@users.sourceforge.net>
* gst/registries/gstxmlregistry.c
(gst_xml_registry_rebuild_recurse): Fix the algorithm to
determine if a file is a G_MODULE. The old one discards paths
containing "so" somewhere in the middle. My home directory is
called "soto". Go figure...
2004-03-31 David Schleef <ds@schleef.org> 2004-03-31 David Schleef <ds@schleef.org>
* gst/gstbuffer.c: (gst_buffer_join): Add function gst_buffer_join() * gst/gstbuffer.c: (gst_buffer_join): Add function gst_buffer_join()

View file

@ -1311,8 +1311,8 @@ gst_xml_registry_rebuild_recurse (GstXMLRegistry * registry,
const gchar * directory) const gchar * directory)
{ {
GDir *dir; GDir *dir;
gchar *temp;
GList *ret = NULL; GList *ret = NULL;
gint dr_len, sf_len;
dir = g_dir_open (directory, 0, NULL); dir = g_dir_open (directory, 0, NULL);
@ -1335,8 +1335,10 @@ gst_xml_registry_rebuild_recurse (GstXMLRegistry * registry,
} }
g_dir_close (dir); g_dir_close (dir);
} else { } else {
if ((temp = strstr (directory, G_MODULE_SUFFIX)) && dr_len = strlen (directory);
(!strcmp (temp, G_MODULE_SUFFIX))) { sf_len = strlen (G_MODULE_SUFFIX);
if (dr_len >= sf_len &&
strcmp (directory + dr_len - sf_len, G_MODULE_SUFFIX) == 0) {
ret = g_list_prepend (ret, g_strdup (directory)); ret = g_list_prepend (ret, g_strdup (directory));
} }
} }