From 1c1bc4acca467bdb15e8c75f3ef3f802d9cafea0 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 19 Apr 2016 13:31:55 +0200 Subject: common: Move xdg_app_dir_pull_from_bundle to xdg_app_pull_from_bundle The only difference is it takes an OstreeRepo, not a XdgAppDir, so we can use it at a lower level too. --- lib/xdg-app-installation.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/xdg-app-installation.c b/lib/xdg-app-installation.c index d97f7c0..c6ab372 100644 --- a/lib/xdg-app-installation.c +++ b/lib/xdg-app-installation.c @@ -868,13 +868,16 @@ xdg_app_installation_install_bundle (XdgAppInstallation *self, /* Pull, prune, etc are not threadsafe, so we work on a copy */ dir_clone = xdg_app_dir_clone (priv->dir); - if (!xdg_app_dir_pull_from_bundle (dir_clone, - file, - remote, - ref, - gpg_data != NULL, - cancellable, - error)) + if (!xdg_app_dir_ensure_repo (dir_clone, cancellable, error)) + goto out; + + if (!xdg_app_pull_from_bundle (xdg_app_dir_get_repo (dir_clone), + file, + remote, + ref, + gpg_data != NULL, + cancellable, + error)) goto out; if (!xdg_app_dir_lock (dir_clone, &lock, -- cgit v1.2.1