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: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c2b4d98f23
commit
9024549fe1
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue