From cca823b490e007a278335374163bb73604910c4f Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Tue, 18 Aug 2015 13:50:17 +0300 Subject: [PATCH] tools: gst-play: Use g_build_filename instead of g_strconcat When running gst-play against a directory name, and suffix the path with a directory separator (e.g. tab completion), gst-play was printing two directory separators in a row. g_build_filename fixes this, and additionally allows for both '/' and '\' as separators on Windows. --- tools/gst-play.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gst-play.c b/tools/gst-play.c index bbcde11079..15c9aa26d9 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -641,7 +641,7 @@ add_to_playlist (GPtrArray * playlist, const gchar * filename) while ((entry = g_dir_read_name (dir))) { gchar *path; - path = g_strconcat (filename, G_DIR_SEPARATOR_S, entry, NULL); + path = g_build_filename (filename, entry, NULL); files = g_list_insert_sorted (files, path, compare); }