VirtualBox

Changeset 79284 in vbox


Ignore:
Timestamp:
Jun 21, 2019 8:38:29 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/RTFileModeToFlagsEx: Added support for 'a' and 'a+' access mode. bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/RTFileModeToFlags.cpp

    r76553 r79284  
    220220                break;
    221221
     222            case 'a': /* Append. */
     223                fMode |= RTFILE_O_WRITE | RTFILE_O_APPEND;
     224                break;
     225
    222226            case '+':
    223227            {
     
    225229                {
    226230                    case 'w':
     231                    case 'a':
    227232                        /* Also use read access in write mode. */
    228233                        fMode |= RTFILE_O_READ;
     
    279284             || !RTStrCmp(pszCur, "open-create"))
    280285        fMode |= RTFILE_O_OPEN_CREATE;
    281     /* Open existing file and place the file pointer at
    282      * the end of the file, if opened with write access.
    283      * Create the file if does not exist. */
     286    /* Open existing file and place the file pointer at the end of the file, if
     287     * opened with write access. Create the file if does not exist.
     288     * Note! This mode is ill conceived as the appending is a accesss mode not open disposition. */
    284289    else if (   !RTStrCmp(pszCur, "oa")
    285290             || !RTStrCmp(pszCur, "open-append"))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette