From aa4074374a69e8d631ebea1a1f95e52c8a57baeb Mon Sep 17 00:00:00 2001 From: Joaquim Rocha Date: Fri, 26 Jan 2018 11:19:43 +0100 Subject: [PATCH] lib/installation: Don't stop getting removable remotes if one attempt fails When listing the removable remotes, it will stop the operation after the first configurable remote that has no collection ID set. This is of course a problem as such an occurrence is not a reason for not trying to list any remaining remotes. This patch fixes that by simply reporting the failures as a debug message instead of aborting. Closes: #1587 Approved by: mwleeds --- lib/flatpak-installation.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/flatpak-installation.c b/lib/flatpak-installation.c index 89e5f1d6..7bcaa981 100644 --- a/lib/flatpak-installation.c +++ b/lib/flatpak-installation.c @@ -1198,6 +1198,7 @@ flatpak_installation_list_remotes_by_type (FlatpakInstallation *self, for (i = 0; remote_names[i] != NULL; ++i) { + g_autoptr(GError) local_error = NULL; if (types_filter[FLATPAK_REMOTE_TYPE_STATIC]) g_ptr_array_add (remotes, flatpak_remote_new_with_dir (remote_names[i], dir_clone)); @@ -1205,8 +1206,9 @@ flatpak_installation_list_remotes_by_type (FlatpakInstallation *self, /* Add the dynamic mirrors of this remote. */ if (!list_remotes_for_configured_remote (self, remote_names[i], dir_clone, types_filter, remotes, - cancellable, error)) - return NULL; + cancellable, &local_error)) + g_debug ("Couldn't find remotes for configured remote %s: %s", + remote_names[i], local_error->message); } return g_steal_pointer (&remotes);