Commit cee15b24 authored by Alexandre Julliard's avatar Alexandre Julliard

libwine: Try to load all modules in the programs directory, not just those with .exe extension.

parent 6c8e3a85
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment