mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
ensure the path passed to Sys_DebugLog is expanded
This commit is contained in:
parent
6a79ee57c4
commit
e105198f48
1 changed files with 4 additions and 1 deletions
|
@ -481,6 +481,9 @@ Sys_DebugLog (const char *file, const char *fmt, ...)
|
|||
va_list args;
|
||||
static dstring_t *data;
|
||||
int fd;
|
||||
char path[PATH_MAX];
|
||||
|
||||
Qexpand_squiggle (file, path);
|
||||
|
||||
if (!data)
|
||||
data = dstring_newstr ();
|
||||
|
@ -488,7 +491,7 @@ Sys_DebugLog (const char *file, const char *fmt, ...)
|
|||
va_start (args, fmt);
|
||||
dvsprintf (data, fmt, args);
|
||||
va_end (args);
|
||||
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
|
||||
fd = open (path, O_WRONLY | O_CREAT | O_APPEND, 0666);
|
||||
write (fd, data->str, data->size - 1);
|
||||
close (fd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue