libwine: Try to load all modules in the programs directory, not just those with .exe extension.
This commit is contained in:
parent
6c8e3a8539
commit
cee15b2449
|
@ -169,22 +169,23 @@ static char *next_dll_path( struct dll_path_context *context )
|
|||
|
||||
switch(index)
|
||||
{
|
||||
case 0: /* try programs dir for .exe files */
|
||||
if (!context->win16 && namelen > 4 && !memcmp( context->name + namelen - 4, ".exe", 4 ))
|
||||
case 0: /* try dlls dir with subdir prefix */
|
||||
if (namelen > 4 && !memcmp( context->name + namelen - 4, ".dll", 4 )) namelen -= 4;
|
||||
if (!context->win16) path = prepend( path, context->name, namelen );
|
||||
path = prepend( path, "/dlls", sizeof("/dlls") - 1 );
|
||||
path = prepend( path, build_dir, strlen(build_dir) );
|
||||
return path;
|
||||
case 1: /* try programs dir with subdir prefix */
|
||||
if (!context->win16)
|
||||
{
|
||||
path = prepend( path, context->name, namelen - 4 );
|
||||
if (namelen > 4 && !memcmp( context->name + namelen - 4, ".exe", 4 )) namelen -= 4;
|
||||
path = prepend( path, context->name, namelen );
|
||||
path = prepend( path, "/programs", sizeof("/programs") - 1 );
|
||||
path = prepend( path, build_dir, strlen(build_dir) );
|
||||
return path;
|
||||
}
|
||||
context->index++;
|
||||
/* fall through */
|
||||
case 1: /* try dlls dir with subdir prefix */
|
||||
if (namelen > 4 && !memcmp( context->name + namelen - 4, ".dll", 4 )) namelen -= 4;
|
||||
if (!context->win16) path = prepend( path, context->name, namelen );
|
||||
path = prepend( path, "/dlls", sizeof("/dlls") - 1 );
|
||||
path = prepend( path, build_dir, strlen(build_dir) );
|
||||
return path;
|
||||
default:
|
||||
index -= 2;
|
||||
if (index < nb_dll_paths)
|
||||
|
|
Loading…
Reference in New Issue