Commit 9024549f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

comdlg32/tests: Use GetTempPathA() instead of the current directory in test_extension().

For some reason, a previous test sets the current directory to C:\windows\system32\ on my Windows 10 machine, which prompts message boxes as the path is not writable. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c2b4d98f
......@@ -1051,7 +1051,7 @@ static void test_extension(void)
{
OPENFILENAMEA ofn = { OPENFILENAME_SIZE_VERSION_400A };
char filename[1024] = {0};
char curdir[MAX_PATH];
char dir[MAX_PATH];
unsigned int i;
BOOL boolret;
......@@ -1070,14 +1070,14 @@ static void test_extension(void)
NULL /* is a test, not an endmark! */
};
boolret = GetCurrentDirectoryA(sizeof(curdir), curdir);
boolret = GetTempPathA(sizeof(dir), dir);
ok(boolret, "Failed to get current dir err %d\n", GetLastError());
ofn.hwndOwner = NULL;
ofn.lpstrFile = filename;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_ENABLEHOOK;
ofn.lpstrInitialDir = curdir;
ofn.lpstrInitialDir = dir;
ofn.lpfnHook = test_extension_wndproc;
ofn.nFileExtension = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment