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:
committed by
Marek Olšák
parent
e933246013
commit
abcaba497d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user