From d68c2956f58091b3dccc281e10423eb6acdc1062 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Sat, 21 Feb 2009 10:02:59 +0100 Subject: [PATCH] fusion/tests: Do not use an hardcoded path for the windows directory. --- dlls/fusion/tests/asmcache.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c index 436a04d2b35..7f757c57cd1 100644 --- a/dlls/fusion/tests/asmcache.c +++ b/dlls/fusion/tests/asmcache.c @@ -987,6 +987,8 @@ static void test_QueryAssemblyInfo(void) HRESULT hr; DWORD size; ULONG disp; + char dllpath[MAX_PATH]; + UINT len; static const WCHAR empty[] = {0}; static const WCHAR commasep[] = {',',' ',0}; @@ -1480,10 +1482,13 @@ static void test_QueryAssemblyInfo(void) } /* FIXME: remove once UninstallAssembly is implemented */ - DeleteFileA("C:\\windows\\assembly\\GAC_MSIL\\wine\\" - "1.0.0.0__2d03617b1c31e2f5\\wine.dll"); - RemoveDirectoryA("C:\\windows\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5"); - RemoveDirectoryA("C:\\windows\\assembly\\GAC_MSIL\\wine"); + len = GetWindowsDirectoryA(dllpath, MAX_PATH); + strcat(dllpath, "\\assembly\\GAC_MSIL\\wine\\\\1.0.0.0__2d03617b1c31e2f5\\wine.dll"); + DeleteFileA(dllpath); + dllpath[len + sizeof("\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5")] = '\0'; + RemoveDirectoryA(dllpath); + dllpath[len + sizeof("\\assembly\\GAC_MSIL\\wine")] = '\0'; + RemoveDirectoryA(dllpath); DeleteFileA("test.dll"); DeleteFileA("wine.dll"); -- 2.11.4.GIT