kernel32/tests: Run file tests in the temp directory if we don't have access to the drive root.

This commit is contained in:
Alexandre Julliard 2009-05-27 12:47:33 +02:00
parent 0629585c24
commit 9ccc9bd6a9

View file

@ -1376,7 +1376,12 @@ static void test_FindFirstFileA(void)
/* try FindFirstFileA on "C:\foo\" */
SetLastError( 0xdeadbeaf );
GetTempFileNameA( buffer, "foo", 0, nonexistent );
if (!GetTempFileNameA( buffer, "foo", 0, nonexistent ) && GetLastError() == ERROR_ACCESS_DENIED)
{
char tmp[MAX_PATH];
GetTempPathA( sizeof(tmp), tmp );
GetTempFileNameA( tmp, "foo", 0, nonexistent );
}
DeleteFileA( nonexistent );
strcpy(buffer2, nonexistent);
strcat(buffer2, "\\");