VirtualBox

Changeset 977 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Feb 19, 2007 12:40:51 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18752
Message:

Main: Fixed: Unable to create a shared folder pointing to the root (/) directory on Linux hosts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r1 r977  
    133133                                     const BSTR aName, const BSTR aHostPath)
    134134{
    135     LogFlowMember (("SharedFolder::protectedInit(): aName={%ls}, aHostPath={%ls}\n",
    136                     aName, aHostPath));
     135    LogFlowThisFunc (("aName={%ls}, aHostPath={%ls}\n", aName, aHostPath));
    137136
    138137    ComAssertRet (aParent && aName && aHostPath, E_INVALIDARG);
     
    141140    size_t hostPathLen = hostPath.length();
    142141   
    143     /* Remove the trailng path unless it's a DOS-like root directory
     142    /* Remove the trailng slash unless it's a root directory
    144143     * (otherwise the comparison with the RTPathAbs() result will fail at least
    145144     * on Linux). Note that this isn't really necessary for the shared folder
     
    147146     * RTDirOpenFiltered() call (see HostServices/SharedFolders) that seems to
    148147     * accept both the slashified paths and not. */
     148#if defined (__OS2__) || defined (__WIN__)
    149149    if (hostPathLen > 2 &&
    150150        RTPATH_IS_SEP (hostPath.raw()[hostPathLen - 1]) &&
    151151        RTPATH_IS_VOLSEP (hostPath.raw()[hostPathLen - 2]))
    152152        ;
     153#else
     154    if (hostPathLen == 1 && RTPATH_IS_SEP (hostPath[0]))
     155        ;
     156#endif
    153157    else
    154158        RTPathStripTrailingSlash (hostPath.mutableRaw());
Note: See TracChangeset for help on using the changeset viewer.

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