mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
Remove .so extension from main module file name after loading it so
that GetModuleFileName returns the right thing.
This commit is contained in:
parent
69b2201883
commit
84dc1390ca
@ -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;
|
if (DOSFS_GetFullName( name, TRUE, &full_name )) name = full_name.long_name;
|
||||||
CloseHandle( main_exe_file );
|
CloseHandle( main_exe_file );
|
||||||
main_exe_file = 0;
|
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 );
|
MESSAGE( "%s: could not load '%s': %s\n", argv0, main_exe_name, error );
|
||||||
ExitProcess(1);
|
ExitProcess(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user