From 84dc1390caeff69bd6d2bce029fb440ff9ee8149 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 31 Jul 2002 17:53:42 +0000 Subject: [PATCH] Remove .so extension from main module file name after loading it so that GetModuleFileName returns the right thing. --- scheduler/process.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scheduler/process.c b/scheduler/process.c index 040f68bccaf..5fc5f495455 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -621,7 +621,11 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win if (DOSFS_GetFullName( name, TRUE, &full_name )) name = full_name.long_name; CloseHandle( main_exe_file ); main_exe_file = 0; - if (wine_dlopen( name, RTLD_NOW, error, sizeof(error) )) goto found; + if (wine_dlopen( name, RTLD_NOW, error, sizeof(error) )) + { + if ((p = strrchr( main_exe_name, '.' )) && !strcmp( p, ".so" )) *p = 0; + goto found; + } MESSAGE( "%s: could not load '%s': %s\n", argv0, main_exe_name, error ); ExitProcess(1); } -- 2.11.4.GIT