apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r209046 - /apr/apr/branches/1.0.x/file_io/os2/open.c
Date Mon, 04 Jul 2005 09:29:10 GMT
Author: bjh
Date: Mon Jul  4 02:29:09 2005
New Revision: 209046

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

Backport from trunk of r180013

Modified:
    apr/apr/branches/1.0.x/file_io/os2/open.c

Modified: apr/apr/branches/1.0.x/file_io/os2/open.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.0.x/file_io/os2/open.c?rev=209046&r1=209045&r2=209046&view=diff
==============================================================================
--- apr/apr/branches/1.0.x/file_io/os2/open.c (original)
+++ apr/apr/branches/1.0.x/file_io/os2/open.c Mon Jul  4 02:29:09 2005
@@ -66,12 +66,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