[PATCH alt 2] loader: Fix the generic case in get_self_exe()
Martin Storsjo
martin at martin.st
Wed Aug 19 15:57:16 CDT 2020
Previously this just returned the matched directory, not the path
to the executable itself.
Signed-off-by: Martin Storsjo <martin at martin.st>
---
Smaller modification, but this builds the returned path twice; once
for testing with access() and once for returning.
---
loader/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/loader/main.c b/loader/main.c
index 0e6b6f66b5..52cf5b573e 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -220,7 +220,7 @@ static const char *get_self_exe( char *argv0 )
free( name );
if (found) break;
}
- if (p) p = strdup( p );
+ if (p) p = build_path( p, argv0 );
free( path );
return p;
}
--
2.24.3 (Apple Git-128)
More information about the wine-devel
mailing list