From c3bea6c8fc473ee437da620a8ca68bc79d4cbd00 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 21 Oct 2016 12:46:38 +0200 Subject: [PATCH] remote-add: Assume --from if location ends with .flatpakrepo If you try to set the flatpakrepo uri as a repo uri for a new remote things get really confused, so lets try to do the right thing anyway. --- app/flatpak-builtins-add-remote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/flatpak-builtins-add-remote.c b/app/flatpak-builtins-add-remote.c index 247c1b07..08963572 100644 --- a/app/flatpak-builtins-add-remote.c +++ b/app/flatpak-builtins-add-remote.c @@ -390,7 +390,8 @@ flatpak_builtin_add_remote (int argc, char **argv, return flatpak_fail (error, _("Remote %s already exists"), remote_name); } - if (opt_from) + if (opt_from || + g_str_has_suffix (location, ".flatpakrepo")) { load_options (location, &gpg_data); if (opt_url == NULL)