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

Alexandre Julliard julliard at winehq.org
Fri Jul 30 10:24:16 CDT 2010


Module: wine
Branch: master
Commit: 4e49518a38cf0447f7b60813e100c4857ffb0537
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4e49518a38cf0447f7b60813e100c4857ffb0537

Author: Andrew Nguyen <anguyen at codeweavers.com>
Date:   Fri Jul 30 07:42:55 2010 -0500

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

---

 dlls/krnl386.exe16/int21.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c
index 39e195a..f32c3a4 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 );
         }




More information about the wine-cvs mailing list