apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r180013 - /apr/apr/trunk/file_io/os2/open.c
Date Sat, 04 Jun 2005 19:11:33 GMT
Author: bjh
Date: Sat Jun  4 12:11:31 2005
New Revision: 180013

URL: http://svn.apache.org/viewcvs?rev=180013&view=rev
Log:
Bug #33844: OS/2: file opened with APR_CREATE would be truncated if APR_APPEND
wasn't also given.

Modified:
    apr/apr/trunk/file_io/os2/open.c

Modified: apr/apr/trunk/file_io/os2/open.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/os2/open.c?rev=180013&r1=180012&r2=180013&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/open.c (original)
+++ apr/apr/trunk/file_io/os2/open.c Sat Jun  4 12:11:31 2005
@@ -67,12 +67,10 @@
     }
 
     if (flag & APR_CREATE) {
-        oflags |= OPEN_ACTION_CREATE_IF_NEW; 
-        if (!(flag & APR_EXCL)) {
-            if (flag & APR_APPEND)
-                oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
-            else
-                oflags |= OPEN_ACTION_REPLACE_IF_EXISTS;
+        oflags |= OPEN_ACTION_CREATE_IF_NEW;
+
+        if (!(flag & APR_EXCL) && !(flag & APR_TRUNCATE)) {
+            oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
         }
     }
     



Mime
View raw message