mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-03 05:24:19 -04:00
lib/remote: Add the URL to the remote when creating it from ostree
Since we can now get the URL of the remote directly from the OstreeRemote object, we should use it when creating a FlatpakRemote. This will allow temporary FlatpakRemote objects (corresponding to removable mounts) to have a URL set to them. Closes: #1587 Approved by: mwleeds
This commit is contained in:
committed by
Atomic Bot
parent
abb1e6f7fd
commit
dc4d16ecbe
@@ -751,6 +751,7 @@ flatpak_remote_new_from_ostree (OstreeRemote *remote,
|
||||
OstreeRepoFinder *repo_finder,
|
||||
FlatpakDir *dir)
|
||||
{
|
||||
g_autofree gchar *url = NULL;
|
||||
FlatpakRemotePrivate *priv;
|
||||
FlatpakRemote *self = g_object_new (FLATPAK_TYPE_REMOTE,
|
||||
"name", ostree_remote_get_name (remote),
|
||||
@@ -761,6 +762,10 @@ flatpak_remote_new_from_ostree (OstreeRemote *remote,
|
||||
if (dir)
|
||||
priv->dir = g_object_ref (dir);
|
||||
|
||||
url = ostree_remote_get_url (remote);
|
||||
if (url != NULL)
|
||||
flatpak_remote_set_url (self, url);
|
||||
|
||||
return self;
|
||||
}
|
||||
#endif /* FLATPAK_ENABLE_P2P */
|
||||
|
||||
Reference in New Issue
Block a user