From 92d9d9e4dc10ca30ff6db17022a6a2dc08a4ee6a Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 17 Aug 2016 15:32:11 +0200 Subject: [PATCH] Update: Fix crashed when updating runtimes The debug spew were looking for the "current" ref, but there is no such thing for runtimes, only apps. --- app/flatpak-builtins-update.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c index 96c51e39..78ada40a 100644 --- a/app/flatpak-builtins-update.c +++ b/app/flatpak-builtins-update.c @@ -122,11 +122,9 @@ do_update (FlatpakDir * dir, } else { - g_autofree char *current = NULL; g_autoptr(GVariant) deploy_data = NULL; g_autofree char *commit = NULL; - current = flatpak_dir_current_ref (dir, parts[1], NULL); - deploy_data = flatpak_dir_get_deploy_data (dir, current, NULL, NULL); + deploy_data = flatpak_dir_get_deploy_data (dir, ref, NULL, NULL); commit = g_strndup (flatpak_deploy_data_get_commit (deploy_data), 12); g_print (_("Now at %s.\n"), commit); } @@ -180,11 +178,9 @@ do_update (FlatpakDir * dir, } else { - g_autofree char *current = NULL; g_autoptr(GVariant) deploy_data = NULL; g_autofree char *commit = NULL; - current = flatpak_dir_current_ref (dir, parts[1], NULL); - deploy_data = flatpak_dir_get_deploy_data (dir, current, NULL, NULL); + deploy_data = flatpak_dir_get_deploy_data (dir, rel->ref, NULL, NULL); commit = g_strndup (flatpak_deploy_data_get_commit (deploy_data), 12); g_print (_("Now at %s.\n"), commit); }