[gnome-software/jrocha/fix-install-queue: 2/3] 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/3] Fix order of saving apps that are queued install
- Date: Fri, 16 Feb 2018 22:35:54 +0000 (UTC)
commit 225733606e121d87ff0ecceed2c0b5381d179c8a
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.
https://phabricator.endlessm.com/T21194
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 0e04ea0d..ca624bee 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1774,11 +1774,10 @@ save_install_queue (GsPluginLoader *plugin_loader)
g_autoptr(GError) error = NULL;
g_autoptr(GString) s = NULL;
g_autofree gchar *file = NULL;
- guint i = 0;
s = g_string_new ("");
g_mutex_lock (&priv->pending_apps_mutex);
- for (i = (gint) gs_app_list_length (priv->pending_apps) - 1; i >= 0; i--) {
+ for (guint i = 0; i < gs_app_list_length (priv->pending_apps); ++i) {
GsApp *app = gs_app_list_index (priv->pending_apps, i);
g_string_append (s, gs_app_get_unique_id (app));
g_string_append_c (s, '\n');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]