summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/queryloaders.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/queryloaders.c')
-rw-r--r--gdk-pixbuf/queryloaders.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
index a9ca01524..a81c80430 100644
--- a/gdk-pixbuf/queryloaders.c
+++ b/gdk-pixbuf/queryloaders.c
@@ -341,6 +341,7 @@ int main (int argc, char **argv)
#ifdef USE_GMODULE
const char *path;
GDir *dir;
+ GList *l, *modules;
path = g_getenv ("GDK_PIXBUF_MODULEDIR");
#ifdef G_OS_WIN32
@@ -352,6 +353,7 @@ int main (int argc, char **argv)
g_string_append_printf (contents, "# LoaderDir = %s\n#\n", path);
+ modules = NULL;
dir = g_dir_open (path, 0, NULL);
if (dir) {
const char *dent;
@@ -360,11 +362,16 @@ int main (int argc, char **argv)
gint len = strlen (dent);
if (len > SOEXT_LEN &&
strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
- query_module (contents, path, dent);
+ modules = g_list_prepend (modules,
+ g_strdup (dent));
}
}
g_dir_close (dir);
}
+ modules = g_list_sort (modules, (GCompareFunc)strcmp);
+ for (l = modules; l != NULL; l = l->next)
+ query_module (contents, path, l->data);
+ g_list_free_full (modules, g_free);
#else
g_string_append_printf (contents, "# dynamic loading of modules not supported\n");
#endif