[gnome-builder/wip/chergert/pipeline-merge: 67/78] build-system: Sanitize data used to determine build dir



commit 8e00b1ad34a7c951594f7dd8bf3e7969be4560c6
Author: Matthew Leeds <mleeds redhat com>
Date:   Mon Feb 6 15:26:35 2017 -0600

    build-system: Sanitize data used to determine build dir
    
    If there are any slashes in any of the variables used to determine the
    build dir, we need to replace them with hyphens so they don't
    cause extra directories to be created.

 libide/buildsystem/ide-build-system.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-system.c b/libide/buildsystem/ide-build-system.c
index 7fc855a..d89f630 100644
--- a/libide/buildsystem/ide-build-system.c
+++ b/libide/buildsystem/ide-build-system.c
@@ -305,7 +305,8 @@ ide_build_system_get_builddir (IdeBuildSystem   *self,
       device_id = ide_configuration_get_device_id (configuration);
       runtime_id = ide_configuration_get_runtime_id (configuration);
 
-      name = g_strdup_printf ("%s-%s-%s", config_id, device_id, runtime_id);
+      name = g_strdelimit (g_strdup_printf ("%s-%s-%s", config_id, device_id, runtime_id),
+                           G_DIR_SEPARATOR_S, '-');
 
       ret = g_build_filename (g_get_user_cache_dir (),
                               "gnome-builder",


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