Author: bjh Date: Mon Jul 4 02:29:48 2005 New Revision: 209047 URL: http://svn.apache.org/viewcvs?rev=209047&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/0.9.x/file_io/os2/open.c Modified: apr/apr/branches/0.9.x/file_io/os2/open.c URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/file_io/os2/open.c?rev=209047&r1=209046&r2=209047&view=diff ============================================================================== --- apr/apr/branches/0.9.x/file_io/os2/open.c (original) +++ apr/apr/branches/0.9.x/file_io/os2/open.c Mon Jul 4 02:29:48 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; } }