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



commit 6fd77690b1f64ea8106e994978744349586a0210
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]