+ /* For the stream, use the id if present, else, use the path. */
+ if (ds_file_group->stream_id != UINT64_C(-1)) {
+ g_string_append_printf(name, " | %" PRIu64, ds_file_group->stream_id);
+ } else {
+ BT_ASSERT(ds_file_group->ds_file_infos->len == 1);
+ struct ctf_fs_ds_file_info *ds_file_info =
+ g_ptr_array_index(ds_file_group->ds_file_infos, 0);
+ g_string_append_printf(name, " | %s", ds_file_info->path->str);
+ }
+
+ return g_string_free(name, FALSE);