From 74a96cbae0bd936b561c1706584ea625ec98b58f Mon Sep 17 00:00:00 2001 From: Matthew Leeds Date: Sun, 14 Jan 2018 23:29:40 -0800 Subject: [PATCH] app: Fix "multiple installations" prompt When a remote is found in multiple installations and we ask "Which do you want to use (0 to abort)?", the 0 choice isn't working because the min value in the call to flatpak_number_prompt() was set to 1. Fix that so the user can abort if they want. Fixes https://github.com/flatpak/flatpak/issues/1305 --- app/flatpak-builtins-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/flatpak-builtins-utils.c b/app/flatpak-builtins-utils.c index 0c874912..f828149d 100644 --- a/app/flatpak-builtins-utils.c +++ b/app/flatpak-builtins-utils.c @@ -369,7 +369,7 @@ flatpak_resolve_duplicate_remotes (GPtrArray *dirs, g_autofree char *dir_name = flatpak_dir_get_name (dir); g_print("%d) %s\n", i + 1, dir_name); } - chosen = flatpak_number_prompt (1, dirs_with_remote->len, _("Which do you want to use (0 to abort)?")); + chosen = flatpak_number_prompt (0, dirs_with_remote->len, _("Which do you want to use (0 to abort)?")); if (chosen == 0) return flatpak_fail (error, _("No remote chosen to resolve ā€˜%s’ which exists in multiple installations"), remote_name); }