Commit 5fda1619 authored by Richard Hughes's avatar Richard Hughes

trivial: Fall back to ordering the plugins by name

If the ordering is important then they should have explicit dependencies set
between plugins (e.g. GS_PLUGIN_RULE_RUN_AFTER) and we shouldn't rely on any
kind of ordering from the filesystem as this is not defined by POSIX and may
differ between XFS and EXT4.
parent e64602ce
...@@ -2290,13 +2290,13 @@ gs_plugin_loader_add_location (GsPluginLoader *plugin_loader, const gchar *locat ...@@ -2290,13 +2290,13 @@ gs_plugin_loader_add_location (GsPluginLoader *plugin_loader, const gchar *locat
static gint static gint
gs_plugin_loader_plugin_sort_fn (gconstpointer a, gconstpointer b) gs_plugin_loader_plugin_sort_fn (gconstpointer a, gconstpointer b)
{ {
GsPlugin **pa = (GsPlugin **) a; GsPlugin *pa = *((GsPlugin **) a);
GsPlugin **pb = (GsPlugin **) b; GsPlugin *pb = *((GsPlugin **) b);
if (gs_plugin_get_order (*pa) < gs_plugin_get_order (*pb)) if (gs_plugin_get_order (pa) < gs_plugin_get_order (pb))
return -1; return -1;
if (gs_plugin_get_order (*pa) > gs_plugin_get_order (*pb)) if (gs_plugin_get_order (pa) > gs_plugin_get_order (pb))
return 1; return 1;
return 0; return g_strcmp0 (gs_plugin_get_name (pa), gs_plugin_get_name (pb));
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment