VirtualBox

Ignore:
Timestamp:
Mar 20, 2014 4:13:19 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92902
Message:

DnD: Bugfixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp

    r50734 r50830  
    430430            {
    431431                Assert(pszFileName >= pszFilePath);
    432                 char *pszRoot = &pszFilePath[pszFileName - pszFilePath];
     432                size_t cbBase = (fFlags & DNDURILIST_FLAGS_ABSOLUTE_PATHS)
     433                              ? 0 /* Use start of path as root. */
     434                              : pszFileName - pszFilePath;
     435                char *pszRoot = &pszFilePath[cbBase];
    433436                m_lstRoot.append(pszRoot);
    434437#ifdef DEBUG_andy
     
    436439                             pszFilePath, pszFileName, pszRoot));
    437440#endif
    438                 rc = appendPathRecursive(pszFilePath,
    439                                          pszFileName - pszFilePath,
     441                rc = appendPathRecursive(pszFilePath, cbBase,
    440442                                         fFlags);
    441443            }
     
    551553    {
    552554        const char *pszCurRoot = m_lstRoot.at(i).c_str();
     555#ifdef DEBUG_andy
     556        LogFlowFunc(("pszCurRoot=%s\n", pszCurRoot));
     557#endif
    553558        if (strBasePath.isNotEmpty())
    554559        {
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