[gnome-builder] flatpak: use per-project cache directories
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: use per-project cache directories
- Date: Tue, 21 Nov 2017 08:15:53 +0000 (UTC)
commit 6c7ccf3646e033dec13b9ab115b3310a048ab547
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 21 00:15:37 2017 -0800
flatpak: use per-project cache directories
src/plugins/flatpak/gbp-flatpak-util.c | 30 ++++--------------------------
1 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-util.c b/src/plugins/flatpak/gbp-flatpak-util.c
index 4a4b2c0..9fbd779 100644
--- a/src/plugins/flatpak/gbp-flatpak-util.c
+++ b/src/plugins/flatpak/gbp-flatpak-util.c
@@ -27,52 +27,30 @@ gchar *
gbp_flatpak_get_repo_dir (IdeConfiguration *configuration)
{
g_autofree gchar *runtime_id = NULL;
- const gchar *project_id;
IdeContext *context;
- IdeProject *project;
g_assert (IDE_IS_CONFIGURATION (configuration));
- runtime_id = g_strdup (ide_configuration_get_runtime_id (configuration));
context = ide_object_get_context (IDE_OBJECT (configuration));
- project = ide_context_get_project (context);
- project_id = ide_project_get_id (project);
-
+ runtime_id = g_strdup (ide_configuration_get_runtime_id (configuration));
g_strdelimit (runtime_id, G_DIR_SEPARATOR_S, '-');
- return g_build_filename (g_get_user_cache_dir (),
- "gnome-builder",
- "flatpak",
- "repos",
- project_id,
- runtime_id,
- NULL);
+ return ide_context_cache_filename (context, "flatpak", "repos", runtime_id, NULL);
}
gchar *
gbp_flatpak_get_staging_dir (IdeConfiguration *configuration)
{
g_autofree gchar *runtime_id = NULL;
- const gchar *project_id;
IdeContext *context;
- IdeProject *project;
g_assert (IDE_IS_CONFIGURATION (configuration));
- runtime_id = g_strdup (ide_configuration_get_runtime_id (configuration));
context = ide_object_get_context (IDE_OBJECT (configuration));
- project = ide_context_get_project (context);
- project_id = ide_project_get_id (project);
-
+ runtime_id = g_strdup (ide_configuration_get_runtime_id (configuration));
g_strdelimit (runtime_id, G_DIR_SEPARATOR_S, '-');
- return g_build_filename (g_get_user_cache_dir (),
- "gnome-builder",
- "flatpak",
- "staging",
- project_id,
- runtime_id,
- NULL);
+ return ide_context_cache_filename (context, "flatpak", "staging", runtime_id, NULL);
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]