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.
This commit is contained in:
Alexander Larsson
2016-10-21 12:46:38 +02:00
parent eb92727f65
commit c3bea6c8fc

View File

@@ -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)