Add error code valid for Win9x and XP.

This commit is contained in:
Saulius Krasuckas 2005-11-10 11:16:20 +00:00 committed by Alexandre Julliard
parent 671738d5c1
commit 63f8bdaa4e
1 changed files with 4 additions and 2 deletions

View File

@ -364,10 +364,12 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
sprintf(tmpstr,"%s\\%s",newdir,LONGDIR); sprintf(tmpstr,"%s\\%s",newdir,LONGDIR);
ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n"); ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
bRes = CreateDirectoryA("c:",NULL); bRes = CreateDirectoryA("c:",NULL);
ok(!bRes && GetLastError() == ERROR_ACCESS_DENIED, ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == ERROR_ALREADY_EXISTS),
"CreateDirectoryA(\"c:\" should have failed (%ld)\n", GetLastError()); "CreateDirectoryA(\"c:\" should have failed (%ld)\n", GetLastError());
bRes = CreateDirectoryA("c:\\",NULL); bRes = CreateDirectoryA("c:\\",NULL);
ok(!bRes && GetLastError() == ERROR_ACCESS_DENIED, ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == ERROR_ALREADY_EXISTS),
"CreateDirectoryA(\"c:\\\" should have failed (%ld)\n", GetLastError()); "CreateDirectoryA(\"c:\\\" should have failed (%ld)\n", GetLastError());
sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,SHORTFILE); sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,SHORTFILE);
hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL,