about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-11-14 10:44:47 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-11-14 10:44:55 +0100
commita1573835dd4d0845ad534bda75008901187ae93a (patch)
tree6165b65f3d355bf11041569c2e8ec1dbb2c4a515 /src/main.c
parent34355d6b0c537ccdfcfcdb30e8c3e6672a8ee72b (diff)
downloadbox64-a1573835dd4d0845ad534bda75008901187ae93a.tar.gz
box64-a1573835dd4d0845ad534bda75008901187ae93a.zip
Change ResolvePath behaviour in sync with box86
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 682f4fe6..933cd57f 100755
--- a/src/main.c
+++ b/src/main.c
@@ -848,10 +848,7 @@ int main(int argc, const char **argv, const char **env) {
     // check BOX64_LD_LIBRARY_PATH and load it
     LoadEnvVars(my_context);
 
-    if(argv[0][0]=='/')
-        my_context->box64path = strdup(argv[0]);
-    else
-        my_context->box64path = ResolveFile(argv[0], &my_context->box64_path);
+    my_context->box64path = ResolveFile(argv[0], &my_context->box64_path);
     // prepare all other env. var
     my_context->envc = CountEnv(environ?environ:env);
     printf_log(LOG_INFO, "Counted %d Env var\n", my_context->envc);
@@ -893,10 +890,7 @@ int main(int argc, const char **argv, const char **env) {
     }
     // lets build argc/argv stuff
     printf_log(LOG_INFO, "Looking for %s\n", prog);
-    if(strchr(prog, '/'))
-        my_context->argv[0] = strdup(prog);
-    else
-        my_context->argv[0] = ResolveFile(prog, &my_context->box64_path);
+    my_context->argv[0] = ResolveFile(prog, &my_context->box64_path);
     // check if box86 is present
     {
         my_context->box86path = strdup(my_context->box64path);