[ forwarded to wine-devel, potential for controversy ]
Patch: open-builtin-exe
Modified files: scheduler: process.c
Log Message: Martin Wilck Martin.Wilck@fujitsu-siemens.com
Winelib apps often (almost always) have mixed upper/lower case names and are therefore never found by open_builtin_exe(). Fix that, without breaking the default (all-lowercase name) for builtin apps.
Index: scheduler/process.c =================================================================== RCS file: /home/wine/wine/scheduler/process.c,v retrieving revision 1.198 diff -u -r1.198 process.c --- scheduler/process.c 27 Aug 2002 01:13:59 -0000 1.198 +++ scheduler/process.c 17 Sep 2002 16:55:18 -0000 @@ -265,11 +265,15 @@ { char exename[MAX_PATH], *p; const char *basename = get_basename(name); + void *exeptr;
if (strlen(basename) >= sizeof(exename)) return NULL; strcpy( exename, basename ); for (p = exename; *p; p++) *p = FILE_tolower(*p); - return wine_dll_load_main_exe( exename, error, error_size, test_only ); + exeptr = wine_dll_load_main_exe( exename, error, error_size, test_only ); + if ( exeptr ) return exeptr; + /* If lower-case name fails, try potential mixed-case name (for Winelib) */ + return wine_dll_load_main_exe( basename, error, error_size, test_only ); }