Alexandre Julliard : libwine: Try to load all modules in the programs directory, not just those with . exe extension.
Alexandre Julliard
julliard at winehq.org
Wed Feb 25 09:22:36 CST 2009
Module: wine
Branch: master
Commit: cee15b24496e9c15bf7c7f2d3cf1b781212ce435
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cee15b24496e9c15bf7c7f2d3cf1b781212ce435
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Feb 24 18:11:53 2009 +0100
libwine: Try to load all modules in the programs directory, not just those with .exe extension.
---
libs/wine/loader.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index dde5a70..b7dd8b3 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -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)
More information about the wine-cvs
mailing list