mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
ntdll: Default to native loadorder for the main exe if not in system directory.
Unlike dlls, executables can have the same name without necessarily being the same application, so defaulting to native is more likely to do the right thing.
This commit is contained in:
parent
f2f44de6dc
commit
c6d9577017
1 changed files with 9 additions and 1 deletions
|
@ -474,9 +474,17 @@ enum loadorder get_load_order( const WCHAR *app_name, const WCHAR *path )
|
||||||
if (basename != module+1 && ((ret = get_load_order_value( std_key, app_key, basename )) != LO_INVALID))
|
if (basename != module+1 && ((ret = get_load_order_value( std_key, app_key, basename )) != LO_INVALID))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
/* if loading the main exe with an explicit path, try native first */
|
||||||
|
if (!app_name && basename != module+1)
|
||||||
|
{
|
||||||
|
ret = LO_NATIVE_BUILTIN;
|
||||||
|
TRACE( "got main exe default %s for %s\n", debugstr_loadorder(ret), debugstr_w(path) );
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
/* and last the hard-coded default */
|
/* and last the hard-coded default */
|
||||||
ret = LO_DEFAULT;
|
ret = LO_DEFAULT;
|
||||||
TRACE( "got hardcoded default %s for %s\n", debugstr_loadorder(ret), debugstr_w(path) );
|
TRACE( "got hardcoded %s for %s\n", debugstr_loadorder(ret), debugstr_w(path) );
|
||||||
|
|
||||||
done:
|
done:
|
||||||
RtlFreeHeap( GetProcessHeap(), 0, module );
|
RtlFreeHeap( GetProcessHeap(), 0, module );
|
||||||
|
|
Loading…
Reference in a new issue