[KERNEL] Fix OpenFile returned value when OF_EXIST flag is specified

Christian Costa titan.costa at wanadoo.fr
Fri Mar 19 13:07:46 CST 2004


Hi,

Changelog:
Fixed OpenFile returned value when OF_EXIST flag is specified.

Christian Costa   titan.costa at wanadoo.fr

-------------- next part --------------
Index: file.c
===================================================================
RCS file: /home/wine/wine/files/file.c,v
retrieving revision 1.209
diff -u -r1.209 file.c
--- file.c	12 Mar 2004 02:02:13 -0000	1.209
+++ file.c	18 Mar 2004 21:27:10 -0000
@@ -1111,6 +1111,10 @@
         if (mode & OF_EXIST) /* Return the handle, but close it first */
             _lclose16( hFileRet );
     }
+    /* MSDN is not clear but when the OF_EXIST flag is specified,
+     * TRUE(1) must be returned on success */
+    if (mode & OF_EXIST)
+	hFileRet = (HFILE)TRUE;
     return hFileRet;
 
 not_found:  /* We get here if the file does not exist */


More information about the wine-patches mailing list