diff --git a/lib/flatpak-installation.c b/lib/flatpak-installation.c index ccd8ff3b..059b60d6 100644 --- a/lib/flatpak-installation.c +++ b/lib/flatpak-installation.c @@ -1003,6 +1003,8 @@ flatpak_installation_install_bundle (FlatpakInstallation *self, /* Pull, prune, etc are not threadsafe, so we work on a copy */ dir_clone = flatpak_dir_clone (dir); + if (flatpak_dir_ensure_repo (dir_clone, cancellable, error)) + return NULL; if (!flatpak_dir_install_bundle (dir_clone, file, NULL, &ref, cancellable, error)) @@ -1071,6 +1073,8 @@ flatpak_installation_install_full (FlatpakInstallation *self, /* Pull, prune, etc are not threadsafe, so we work on a copy */ dir_clone = flatpak_dir_clone (dir); + if (flatpak_dir_ensure_repo (dir_clone, cancellable, error)) + return NULL; /* Work around ostree-pull spinning the default main context for the sync calls */ main_context = g_main_context_new (); @@ -1195,6 +1199,8 @@ flatpak_installation_update_full (FlatpakInstallation *self, /* Pull, prune, etc are not threadsafe, so we work on a copy */ dir_clone = flatpak_dir_clone (dir); + if (flatpak_dir_ensure_repo (dir_clone, cancellable, error)) + return NULL; /* Work around ostree-pull spinning the default main context for the sync calls */ main_context = g_main_context_new (); @@ -1299,6 +1305,8 @@ flatpak_installation_uninstall (FlatpakInstallation *self, /* prune, etc are not threadsafe, so we work on a copy */ dir_clone = flatpak_dir_clone (dir); + if (flatpak_dir_ensure_repo (dir_clone, cancellable, error)) + return FALSE; if (!flatpak_dir_uninstall (dir_clone, ref, FLATPAK_HELPER_UNINSTALL_FLAGS_NONE, cancellable, error)) @@ -1520,6 +1528,8 @@ flatpak_installation_update_appstream_sync (FlatpakInstallation *self, /* Pull, prune, etc are not threadsafe, so we work on a copy */ dir_clone = flatpak_dir_clone (dir); + if (flatpak_dir_ensure_repo (dir_clone, cancellable, error)) + return FALSE; if (main_context) g_main_context_pop_thread_default (main_context);