return parsed_list;
}
+static gchar *
+make_safe_file_name (const gchar * name)
+{
+ gchar *ret = g_strdup (name);
+ gchar *c;
+ for (c = ret; *c; c++) {
+ switch (*c) {
+ case '<':
+ case '>':
+ case ':':
+ case '"':
+ case '/':
+ case '\\':
+ case '|':
+ case '?':
+ case '*':
+ *c = '-';
+ break;
+ }
+ }
+ return ret;
+}
+
static ValidateFlowOverride *
validate_flow_override_new (GstStructure * config)
{
flow->actual_results_dir = g_strdup (".");
{
+ gchar *pad_name_safe = make_safe_file_name (flow->pad_name);
gchar *expectations_file_name =
- g_strdup_printf ("log-%s-expected", flow->pad_name);
+ g_strdup_printf ("log-%s-expected", pad_name_safe);
gchar *actual_results_file_name =
- g_strdup_printf ("log-%s-actual", flow->pad_name);
+ g_strdup_printf ("log-%s-actual", pad_name_safe);
flow->expectations_file_path =
g_build_path (G_DIR_SEPARATOR_S, flow->expectations_dir,
expectations_file_name, NULL);
actual_results_file_name, NULL);
g_free (expectations_file_name);
g_free (actual_results_file_name);
+ g_free (pad_name_safe);
}
if (g_file_test (flow->expectations_file_path, G_FILE_TEST_EXISTS)) {