[PATCH 0/1] MR9933: fusion: Create the legacy GAC directory in CreateAssemblyCache().
From: Hans Leidekker <hans@codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45930 --- dlls/fusion/asmcache.c | 5 +++++ dlls/fusion/tests/asmcache.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/fusion/asmcache.c b/dlls/fusion/asmcache.c index 05c72388b90..e008cdc9d8f 100644 --- a/dlls/fusion/asmcache.c +++ b/dlls/fusion/asmcache.c @@ -540,6 +540,7 @@ static const IAssemblyCacheVtbl AssemblyCacheVtbl = { HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved) { IAssemblyCacheImpl *cache; + WCHAR path[MAX_PATH]; TRACE("(%p, %ld)\n", ppAsmCache, dwReserved); @@ -559,6 +560,10 @@ HRESULT WINAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved return HRESULT_FROM_WIN32( GetLastError() ); } *ppAsmCache = &cache->IAssemblyCache_iface; + + GetWindowsDirectoryW(path, ARRAY_SIZE(path)); + wcscat(path, L"\\assembly"); + create_full_path(path); return S_OK; } diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c index 6e37e25b2e3..85cfd371c11 100644 --- a/dlls/fusion/tests/asmcache.c +++ b/dlls/fusion/tests/asmcache.c @@ -869,6 +869,8 @@ static BOOL check_dotnet20(void) static void test_CreateAssemblyCache(void) { IAssemblyCache *cache; + WCHAR path[MAX_PATH]; + DWORD attrs; HRESULT hr; /* NULL ppAsmCache */ @@ -878,8 +880,12 @@ static void test_CreateAssemblyCache(void) /* dwReserved is non-zero */ hr = pCreateAssemblyCache(&cache, 42); ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); - IAssemblyCache_Release(cache); + + GetWindowsDirectoryW(path, ARRAY_SIZE(path)); + wcscat(path, L"\\assembly"); + attrs = GetFileAttributesW(path); + ok(attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY), "got 0x%lx\n", attrs); } static void test_CreateAssemblyCacheItem(void) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9933
participants (2)
-
Hans Leidekker -
Hans Leidekker (@hans)