krnl386.exe16: Ignore access denied error when flushing file.

Sebastian Lackner sebastian at fds-team.de
Sat Mar 11 00:26:34 CST 2017


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---

For https://bugs.winehq.org/show_bug.cgi?id=42625.

 dlls/krnl386.exe16/int21.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c
index 605c94519fa..308fc497ee9 100644
--- a/dlls/krnl386.exe16/int21.c
+++ b/dlls/krnl386.exe16/int21.c
@@ -5282,7 +5282,8 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
 
     case 0x68: /* "FFLUSH" - COMMIT FILE */
         TRACE( "FFLUSH - handle %d\n", BX_reg(context) );
-        if (!FlushFileBuffers( DosFileHandleToWin32Handle(BX_reg(context)) ))
+        if (!FlushFileBuffers( DosFileHandleToWin32Handle(BX_reg(context)) ) &&
+                GetLastError() != ERROR_ACCESS_DENIED)
             bSetDOSExtendedError = TRUE;
         break;
 
@@ -5307,7 +5308,8 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
 
     case 0x6a: /* COMMIT FILE */
         TRACE( "COMMIT FILE - handle %d\n", BX_reg(context) );
-        if (!FlushFileBuffers( DosFileHandleToWin32Handle(BX_reg(context)) ))
+        if (!FlushFileBuffers( DosFileHandleToWin32Handle(BX_reg(context)) ) &&
+                GetLastError() != ERROR_ACCESS_DENIED)
             bSetDOSExtendedError = TRUE;
         break;
 
-- 
2.11.0



More information about the wine-patches mailing list