Previously this just returned the matched directory, not the path to the executable itself.
Signed-off-by: Martin Storsjo martin@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; }