gallium/hud: add a path separator between dump directory and filename

It's more user friendly and it avoids to write files in unexpected
places.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Edmondo Tommasina 2017-01-01 22:31:57 +01:00 committed by Marek Olšák
parent e933246013
commit abcaba497d

View file

@ -873,9 +873,10 @@ hud_graph_set_dump_file(struct hud_graph *gr)
char *dump_file;
if (hud_dump_dir && access(hud_dump_dir, W_OK) == 0) {
dump_file = malloc(strlen(hud_dump_dir) + sizeof(gr->name));
dump_file = malloc(strlen(hud_dump_dir) + sizeof("/") + sizeof(gr->name));
if (dump_file) {
strcpy(dump_file, hud_dump_dir);
strcat(dump_file, "/");
strcat(dump_file, gr->name);
gr->fd = fopen(dump_file, "w+");
free(dump_file);