mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-06 01:40:28 +00:00
Save a copy if loader exename is absolute
This commit is contained in:
parent
85086eec1f
commit
9de9dcf3c1
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ static int TryPath(const char *q, int com) {
|
|||
// if the loader passed a relative path, prepend cwd to it.
|
||||
// called early in init.
|
||||
void __init_program_executable_name(void) {
|
||||
if (__program_executable_name &&
|
||||
if (__program_executable_name && *__program_executable_name != '/' &&
|
||||
CopyWithCwd(__program_executable_name, g_prog.u.buf,
|
||||
g_prog.u.buf + sizeof(g_prog.u.buf))) {
|
||||
__program_executable_name = g_prog.u.buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue