Commit 9ccc9bd6 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 0629585c
...@@ -1376,7 +1376,12 @@ static void test_FindFirstFileA(void) ...@@ -1376,7 +1376,12 @@ static void test_FindFirstFileA(void)
/* try FindFirstFileA on "C:\foo\" */ /* try FindFirstFileA on "C:\foo\" */
SetLastError( 0xdeadbeaf ); 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 ); DeleteFileA( nonexistent );
strcpy(buffer2, nonexistent); strcpy(buffer2, nonexistent);
strcat(buffer2, "\\"); strcat(buffer2, "\\");
......
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