Commit 13192047 authored by Matthew Leeds's avatar Matthew Leeds
Browse files

flatpak: Sanitize runtime_id for use in dir names

We don't want slashes in the runtime id affecting the build directories
being used.
parent 8e00b1ad
......@@ -23,18 +23,20 @@
gchar *
gbp_flatpak_get_repo_dir (IdeConfiguration *configuration)
{
g_autofree gchar *runtime_id = NULL;
const gchar *project_id;
const gchar *runtime_id;
IdeContext *context;
IdeProject *project;
g_assert (IDE_IS_CONFIGURATION (configuration));
runtime_id = ide_configuration_get_runtime_id (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);
g_strdelimit (runtime_id, G_DIR_SEPARATOR_S, '-');
return g_build_filename (g_get_user_cache_dir (),
"gnome-builder",
"flatpak",
......@@ -47,18 +49,20 @@ gbp_flatpak_get_repo_dir (IdeConfiguration *configuration)
gchar *
gbp_flatpak_get_staging_dir (IdeConfiguration *configuration)
{
g_autofree gchar *runtime_id = NULL;
const gchar *project_id;
const gchar *runtime_id;
IdeContext *context;
IdeProject *project;
g_assert (IDE_IS_CONFIGURATION (configuration));
runtime_id = ide_configuration_get_runtime_id (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);
g_strdelimit (runtime_id, G_DIR_SEPARATOR_S, '-');
return g_build_filename (g_get_user_cache_dir (),
"gnome-builder",
"flatpak",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment