mscoree: Always base the config file path on the main exe.

Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Esme Povirk 2021-08-27 15:20:25 -05:00 committed by Alexandre Julliard
parent 2b37b075a6
commit 052113c0b6
1 changed files with 4 additions and 12 deletions

View File

@ -137,7 +137,7 @@ static void domain_restore(MonoDomain *prev_domain)
static HRESULT RuntimeHost_GetDefaultDomain(RuntimeHost *This, const WCHAR *config_path, MonoDomain **result)
{
WCHAR config_dir[MAX_PATH];
WCHAR exe_config[MAX_PATH];
WCHAR base_dir[MAX_PATH];
char *base_dirA, *config_pathA, *slash;
HRESULT res=S_OK;
@ -151,18 +151,10 @@ static HRESULT RuntimeHost_GetDefaultDomain(RuntimeHost *This, const WCHAR *conf
if (!config_path)
{
DWORD len = ARRAY_SIZE(config_dir);
GetModuleFileNameW(NULL, exe_config, MAX_PATH);
lstrcatW(exe_config, L".config");
static const WCHAR machine_configW[] = {'\\','C','O','N','F','I','G','\\','m','a','c','h','i','n','e','.','c','o','n','f','i','g',0};
res = ICLRRuntimeInfo_GetRuntimeDirectory(&This->version->ICLRRuntimeInfo_iface,
config_dir, &len);
if (FAILED(res))
goto end;
lstrcatW(config_dir, machine_configW);
config_path = config_dir;
config_path = exe_config;
}
config_pathA = WtoA(config_path);