[gnome-builder/gnome-builder-41] flatpak: check for runtime/ before parsing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-41] flatpak: check for runtime/ before parsing
- Date: Wed, 17 Nov 2021 00:40:42 +0000 (UTC)
commit a6ab6b0b3fe25fd9ef96ab1d3b322f243e0921e2
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 16 16:34:51 2021 -0800
flatpak: check for runtime/ before parsing
src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c | 8 +++++++-
1 file changed, 7 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 e5b832966..601930d7b 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -1037,9 +1037,15 @@ ipc_flatpak_service_impl_install (IpcFlatpakService *service,
for (guint i = 0; full_ref_names[i]; i++)
{
- g_autoptr(FlatpakRef) ref = flatpak_ref_parse (full_ref_names[i], NULL);
+ const char *name = full_ref_names[i];
+ g_autoptr(FlatpakRef) ref = NULL;
+ g_autofree char *adjusted = NULL;
InstallRef iref = {0};
+ if (!g_str_has_prefix (name, "runtime/") && !g_str_has_prefix (name, "app/"))
+ name = adjusted = g_strdup_printf ("runtime/%s", full_ref_names[i]);
+
+ ref = flatpak_ref_parse (name, NULL);
if (ref != NULL && is_installed (self, ref))
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]