VirtualBox

Changeset 83533 in vbox for trunk/src


Ignore:
Timestamp:
Apr 3, 2020 2:31:58 PM (5 years ago)
Author:
vboxsync
Message:

Guest Control/Main: Fixed file open ex flags checks in GuestSession::[i_]fileOpenEx() and removed unused GuestFileOpenInfo struct in IGuestSession::fileOpenEx(). bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r83489 r83533  
    14971497    uint32_t fOpenEx = 0;
    14981498    for (size_t i = 0; i < aFlags.size(); i++)
    1499         fOpenEx = aFlags[i];
     1499        fOpenEx |= aFlags[i];
    15001500    if (fOpenEx)
    15011501        return VERR_INVALID_PARAMETER; /* FileOpenExFlag not implemented yet. */
     
    37723772    LogFlowThisFuncEnter();
    37733773
    3774     GuestFileOpenInfo openInfo;
    3775     openInfo.mFilename = aPath;
    3776     openInfo.mCreationMode = aCreationMode;
    3777 
    37783774    /* Validate aAccessMode. */
    37793775    switch (aAccessMode)
     
    37843780            RT_FALL_THRU();
    37853781        case FileAccessMode_ReadWrite:
    3786             openInfo.mAccessMode = aAccessMode;
    37873782            break;
    37883783        case FileAccessMode_AppendOnly:
     
    38083803            RT_FALL_THRU();
    38093804        case FileOpenAction_AppendOrCreate:
    3810             openInfo.mOpenAction = aOpenAction;
    38113805            break;
    38123806        default:
     
    38183812    {
    38193813        case FileSharingMode_All:
    3820             openInfo.mSharingMode = aSharingMode;
    38213814            break;
    38223815        case FileSharingMode_Read:
     
    38353828    uint32_t fOpenEx = 0;
    38363829    for (size_t i = 0; i < aFlags.size(); i++)
    3837         fOpenEx = aFlags[i];
     3830        fOpenEx |= aFlags[i];
    38383831    if (fOpenEx)
    38393832        return setError(E_INVALIDARG, tr("Unsupported FileOpenExFlag value(s) in aFlags (%#x)"), fOpenEx);
    3840     openInfo.mfOpenEx = fOpenEx;
    38413833
    38423834    ComObjPtr <GuestFile> pFile;
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