mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-12 02:51:12 -04:00
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
This commit is contained in:
committed by
Matthew Leeds
parent
d69cce2be1
commit
74a96cbae0
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user