[gnome-software/jrocha/fix-install-queue: 2/4] Fix order of saving apps that are queued install
- From: Joaquim Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/jrocha/fix-install-queue: 2/4] Fix order of saving apps that are queued install
- Date: Fri, 16 Feb 2018 16:34:48 +0000 (UTC)
commit 246a0518d95b39ba94da82ee2d44d01a6d0416c4
Author: Joaquim Rocha <jrocha endlessm com>
Date: Fri Feb 16 13:21:08 2018 +0100
Fix order of saving apps that are queued install
For some reason, the order was being reversed, but since this is a
queue, then it should store and load the apps in the order they have
been requested to be installed.
lib/gs-plugin-loader.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 30904d8d..36bbf02c 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1786,7 +1786,6 @@ save_install_queue (GsPluginLoader *plugin_loader)
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
GPtrArray *pending_apps;
gboolean ret;
- gint i;
g_autoptr(GError) error = NULL;
g_autoptr(GString) s = NULL;
g_autofree gchar *file = NULL;
@@ -1794,7 +1793,7 @@ save_install_queue (GsPluginLoader *plugin_loader)
s = g_string_new ("");
pending_apps = priv->pending_apps;
g_mutex_lock (&priv->pending_apps_mutex);
- for (i = (gint) pending_apps->len - 1; i >= 0; i--) {
+ for (guint i = 0; i < pending_apps->len; ++i) {
const gchar *id = g_ptr_array_index (pending_apps, i);
g_string_append (s, id);
g_string_append_c (s, '\n');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]