mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
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:
parent
e933246013
commit
abcaba497d
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue