Esme Povirk : mscoree: Always base the config file path on the main exe.
Alexandre Julliard
julliard at winehq.org
Mon Aug 30 15:53:51 CDT 2021
Module: wine
Branch: master
Commit: 052113c0b6d076019e9e2ba5e0641caed68d041d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=052113c0b6d076019e9e2ba5e0641caed68d041d
Author: Esme Povirk <esme at codeweavers.com>
Date: Fri Aug 27 15:20:25 2021 -0500
mscoree: Always base the config file path on the main exe.
Signed-off-by: Esme Povirk <esme at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mscoree/corruntimehost.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index 51522c57d83..d47492b7d4d 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -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);
More information about the wine-cvs
mailing list