krnl386.exe: Fix last error check for DOS compatibility hack.

This commit is contained in:
Andrew Nguyen 2010-07-30 07:42:55 -05:00 committed by Alexandre Julliard
parent 5cc0d1ee80
commit 4e49518a38
1 changed files with 2 additions and 1 deletions

View File

@ -1092,7 +1092,8 @@ static BOOL INT21_CreateFile( CONTEXT86 *context,
winMode, winAttributes, 0 ); winMode, winAttributes, 0 );
/* DOS allows to open files on a CDROM R/W */ /* DOS allows to open files on a CDROM R/W */
if( winHandle == INVALID_HANDLE_VALUE && if( winHandle == INVALID_HANDLE_VALUE &&
GetLastError()== ERROR_WRITE_PROTECT) { (GetLastError() == ERROR_WRITE_PROTECT ||
GetLastError() == ERROR_ACCESS_DENIED)) {
winHandle = CreateFileW( pathW, winAccess & ~GENERIC_WRITE, winHandle = CreateFileW( pathW, winAccess & ~GENERIC_WRITE,
winSharing, NULL, winMode, winAttributes, 0 ); winSharing, NULL, winMode, winAttributes, 0 );
} }