shell32/tests: Fix the system directory test for old WoW64 platforms.

This commit is contained in:
Alexandre Julliard 2009-12-23 12:18:37 +01:00
parent 875f726077
commit 9d44153273
1 changed files with 5 additions and 5 deletions

View File

@ -675,7 +675,7 @@ static void testWinDir(void)
*/ */
static void testSystemDir(void) static void testSystemDir(void)
{ {
char systemShellPath[MAX_PATH], systemDir[MAX_PATH] = { 0 }; char systemShellPath[MAX_PATH], systemDir[MAX_PATH], systemDirx86[MAX_PATH];
if (!pSHGetSpecialFolderPathA) return; if (!pSHGetSpecialFolderPathA) return;
@ -689,13 +689,13 @@ static void testSystemDir(void)
systemDir, systemShellPath); systemDir, systemShellPath);
} }
if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDir, sizeof(systemDir))) if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDirx86, sizeof(systemDirx86)))
GetSystemDirectoryA(systemDir, sizeof(systemDir)); GetSystemDirectoryA(systemDirx86, sizeof(systemDirx86));
myPathRemoveBackslashA(systemDir); myPathRemoveBackslashA(systemDirx86);
if (pSHGetSpecialFolderPathA(NULL, systemShellPath, CSIDL_SYSTEMX86, FALSE)) if (pSHGetSpecialFolderPathA(NULL, systemShellPath, CSIDL_SYSTEMX86, FALSE))
{ {
myPathRemoveBackslashA(systemShellPath); myPathRemoveBackslashA(systemShellPath);
ok(!lstrcmpiA(systemDir, systemShellPath), ok(!lstrcmpiA(systemDirx86, systemShellPath) || broken(!lstrcmpiA(systemDir, systemShellPath)),
"GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n", "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
systemDir, systemShellPath); systemDir, systemShellPath);
} }