mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-02 07:24:05 +00:00
backends: when failing to determine executable path, print full path to cwd instead of just ./
This commit is contained in:
parent
c0eda78e43
commit
38843f0f33
1 changed files with 3 additions and 2 deletions
|
@ -156,8 +156,9 @@ const char *Sys_GetBinaryDir(void)
|
|||
SetExecutablePath(exeDir);
|
||||
|
||||
if (exeDir[0] == '\0') {
|
||||
Com_Printf("Couldn't determine executable path. Using ./ instead.\n");
|
||||
Q_strlcpy(exeDir, "./", sizeof(exeDir));
|
||||
getcwd(exeDir, sizeof(exeDir));
|
||||
strcat(exeDir, "/");
|
||||
Com_Printf("Couldn't determine executable path. Using %s instead.\n", exeDir);
|
||||
} else {
|
||||
// cut off executable name
|
||||
char *lastSlash = strrchr(exeDir, '/');
|
||||
|
|
Loading…
Reference in a new issue