[gnome-builder/wip/chergert/pipeline-merge: 69/76] flatpak: Use gbp_flatpak_get_staging_dir



commit 9e4fc1fef1f9b5250d2e7855bde9393b9a0ac79e
Author: Matthew Leeds <mleeds redhat com>
Date:   Mon Feb 6 16:53:58 2017 -0600

    flatpak: Use gbp_flatpak_get_staging_dir

 plugins/flatpak/gbp-flatpak-runtime.c |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-runtime.c b/plugins/flatpak/gbp-flatpak-runtime.c
index c29826d..cf5624b 100644
--- a/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/plugins/flatpak/gbp-flatpak-runtime.c
@@ -25,6 +25,7 @@
 #include "gbp-flatpak-subprocess-launcher.h"
 #include "gbp-flatpak-runner.h"
 #include "gbp-flatpak-configuration.h"
+#include "gbp-flatpak-util.h"
 
 struct _GbpFlatpakRuntime
 {
@@ -53,21 +54,11 @@ static GParamSpec *properties [N_PROPS];
 static gchar *
 get_staging_directory (GbpFlatpakRuntime *self)
 {
-  IdeContext *context;
-  IdeProject *project;
-
-  g_assert (GBP_IS_FLATPAK_RUNTIME (self));
+  IdeContext *context = ide_object_get_context (IDE_OBJECT (self));
+  IdeConfigurationManager *config_manager = ide_context_get_configuration_manager (context);
+  IdeConfiguration *config = ide_configuration_manager_get_current (config_manager);
 
-  context = ide_object_get_context (IDE_OBJECT (self));
-  project = ide_context_get_project (context);
-
-  return g_build_filename (g_get_user_cache_dir (),
-                           "gnome-builder",
-                           "flatpak",
-                           "staging",
-                           ide_project_get_id (project),
-                           ide_runtime_get_id (IDE_RUNTIME (self)),
-                           NULL);
+  return gbp_flatpak_get_staging_dir (config);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]