VirtualBox

Changeset 97305 in vbox


Ignore:
Timestamp:
Oct 26, 2022 2:40:10 PM (2 years ago)
Author:
vboxsync
Message:

Main/Guest Control: Renamed GuestSession::i_getPathStyle() -> i_getGuestPathStyle() + added GuestSession::i_getHostPathStyle(), to emphasized what is what.

Fixed source path style in GuestSession::fileCopyToGuest(), GuestSession::directoryCopyToGuest() and GuestSession::copyToGuest(). ​bugref:10286

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r96407 r97305  
    326326    int                     i_onRemove(void);
    327327    int                     i_onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
    328     PathStyle_T             i_getPathStyle(void);
     328    PathStyle_T             i_getGuestPathStyle(void);
     329    static PathStyle_T      i_getHostPathStyle(void);
    329330    int                     i_startSession(int *pGuestRc);
    330331    int                     i_startSessionAsync(void);
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r97151 r97305  
    528528HRESULT GuestSession::getPathStyle(PathStyle_T *aPathStyle)
    529529{
    530     *aPathStyle = i_getPathStyle();
     530    *aPathStyle = i_getGuestPathStyle();
    531531    return S_OK;
    532532}
     
    766766        return setError(E_INVALIDARG, tr("No destination specified"));
    767767
     768    GuestSessionFsSourceSet::const_iterator itSrc = SourceSet.begin();
     769    while (itSrc != SourceSet.end())
     770    {
     771        LogRel2(("Guest Control: Copying '%s' from guest to '%s' on the host (type: %s, filter: %s)\n",
     772                 itSrc->strSource.c_str(), strDestination.c_str(), GuestBase::fsObjTypeToStr(itSrc->enmType), itSrc->strFilter.c_str()));
     773        ++itSrc;
     774    }
     775
    768776    /* Create a task and return the progress obejct for it. */
    769777    GuestSessionTaskCopyFrom *pTask = NULL;
     
    824832
    825833    LogFlowThisFuncEnter();
     834
     835    GuestSessionFsSourceSet::const_iterator itSrc = SourceSet.begin();
     836    while (itSrc != SourceSet.end())
     837    {
     838        LogRel2(("Guest Control: Copying '%s' from host to '%s' on the guest (type: %s, filter: %s)\n",
     839                 itSrc->strSource.c_str(), strDestination.c_str(), GuestBase::fsObjTypeToStr(itSrc->enmType), itSrc->strFilter.c_str()));
     840        ++itSrc;
     841    }
    826842
    827843    /* Create a task and return the progress object for it. */
     
    21272143 * @returns Separation style used on the guest.
    21282144 */
    2129 PathStyle_T GuestSession::i_getPathStyle(void)
     2145PathStyle_T GuestSession::i_getGuestPathStyle(void)
    21302146{
    21312147    PathStyle_T enmPathStyle;
     
    21492165
    21502166    return enmPathStyle;
     2167}
     2168
     2169/**
     2170 * Returns the path separation style used on the host.
     2171 *
     2172 * @returns Separation style used on the host.
     2173 */
     2174/* static */
     2175PathStyle_T GuestSession::i_getHostPathStyle(void)
     2176{
     2177#if RTPATH_STYLE == RTPATH_STR_F_STYLE_DOS
     2178    return PathStyle_DOS;
     2179#else
     2180    return PathStyle_UNIX;
     2181#endif
    21512182}
    21522183
     
    34323463    source.strSource            = aSource;
    34333464    source.enmType              = FsObjType_File;
    3434     source.enmPathStyle         = i_getPathStyle();
     3465    source.enmPathStyle         = i_getGuestPathStyle();
    34353466    source.fDryRun              = false; /** @todo Implement support for a dry run. */
    34363467    source.Type.File.fCopyFlags = (FileCopyFlag_T)fFlags;
     
    34603491    source.strSource            = aSource;
    34613492    source.enmType              = FsObjType_File;
    3462     source.enmPathStyle         = i_getPathStyle();
     3493    source.enmPathStyle         = GuestSession::i_getHostPathStyle();
    34633494    source.fDryRun              = false; /** @todo Implement support for a dry run. */
    34643495    source.Type.File.fCopyFlags = (FileCopyFlag_T)fFlags;
     
    35243555        source.strFilter    = strFilter;
    35253556        source.enmType      = objData.mType;
    3526         source.enmPathStyle = i_getPathStyle();
     3557        source.enmPathStyle = i_getGuestPathStyle();
    35273558        source.fDryRun      = false; /** @todo Implement support for a dry run. */
    35283559
     
    35943625        source.strFilter    = strFilter;
    35953626        source.enmType      = GuestBase::fileModeToFsObjType(objInfo.Attr.fMode);
    3596         source.enmPathStyle = i_getPathStyle();
     3627        source.enmPathStyle = GuestSession::i_getHostPathStyle();
    35973628        source.fDryRun      = false; /** @todo Implement support for a dry run. */
    35983629
     
    36503681    source.strSource            = aSource;
    36513682    source.enmType              = FsObjType_Directory;
    3652     source.enmPathStyle         = i_getPathStyle();
     3683    source.enmPathStyle         = i_getGuestPathStyle();
    36533684    source.fDryRun              = false; /** @todo Implement support for a dry run. */
    36543685    source.Type.Dir.fCopyFlags  = (DirectoryCopyFlag_T)fFlags;
     
    36793710    source.strSource           = aSource;
    36803711    source.enmType             = FsObjType_Directory;
    3681     source.enmPathStyle        = i_getPathStyle();
     3712    source.enmPathStyle        = GuestSession::i_getHostPathStyle();
    36823713    source.fDryRun             = false; /** @todo Implement support for a dry run. */
    36833714    source.Type.Dir.fCopyFlags = (DirectoryCopyFlag_T)fFlags;
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