From 4e49518a38cf0447f7b60813e100c4857ffb0537 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Fri, 30 Jul 2010 07:42:55 -0500 Subject: [PATCH] krnl386.exe: Fix last error check for DOS compatibility hack. --- dlls/krnl386.exe16/int21.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c index 39e195aa460..f32c3a41fc8 100644 --- a/dlls/krnl386.exe16/int21.c +++ b/dlls/krnl386.exe16/int21.c @@ -1092,7 +1092,8 @@ static BOOL INT21_CreateFile( CONTEXT86 *context, winMode, winAttributes, 0 ); /* DOS allows to open files on a CDROM R/W */ if( winHandle == INVALID_HANDLE_VALUE && - GetLastError()== ERROR_WRITE_PROTECT) { + (GetLastError() == ERROR_WRITE_PROTECT || + GetLastError() == ERROR_ACCESS_DENIED)) { winHandle = CreateFileW( pathW, winAccess & ~GENERIC_WRITE, winSharing, NULL, winMode, winAttributes, 0 ); }