Module: wine Branch: master Commit: d68c2956f58091b3dccc281e10423eb6acdc1062 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d68c2956f58091b3dccc281e10... Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sat Feb 21 10:02:59 2009 +0100 fusion/tests: Do not use an hardcoded path for the windows directory. --- dlls/fusion/tests/asmcache.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c index 436a04d..7f757c5 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");