[gnome-builder] flatpak: fix loading of user installation
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: fix loading of user installation
- Date: Sat, 1 May 2021 16:51:06 +0000 (UTC)
commit d0ad6d20064cee533a4668391da39a2ad11cedcb
Author: Christian Hergert <chergert redhat com>
Date: Sat May 1 09:50:50 2021 -0700
flatpak: fix loading of user installation
We can't rely on flatpak_installation_new_user() because that will take the
alternate XDG directories into account instead of the one in the users
home directory (the typical one).
src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
index 82051b878..277de4811 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -908,10 +908,12 @@ ipc_flatpak_service_impl_constructed (GObject *object)
IpcFlatpakServiceImpl *self = (IpcFlatpakServiceImpl *)object;
g_autoptr(GPtrArray) installations = NULL;
g_autoptr(FlatpakInstallation) user = NULL;
+ g_autoptr(GFile) user_file = NULL;
G_OBJECT_CLASS (ipc_flatpak_service_impl_parent_class)->constructed (object);
- if ((user = flatpak_installation_new_user (NULL, NULL)))
+ user_file = g_file_new_build_filename (g_get_home_dir (), ".local", "share", "flatpak", "repo", NULL);
+ if ((user = flatpak_installation_new_for_path (user_file, TRUE, NULL, NULL)))
add_installation (self, user, NULL);
if ((installations = flatpak_get_system_installations (NULL, NULL)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]