diff --git a/libs/util/sys.c b/libs/util/sys.c index eaa058df5..86beacc22 100644 --- a/libs/util/sys.c +++ b/libs/util/sys.c @@ -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); }