VirtualBox

Changeset 50593 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Feb 26, 2014 8:44:58 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92464
Message:

DnD: Bugfixes for Linux hosts.

File:
1 edited

Legend:

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

    r50561 r50593  
    348348    AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
    349349
    350     char *pszPathURI = RTUriCreate("file" /* pszScheme */, "/" /* pszAuthority */,
    351                                    pszPath, NULL /* pszQuery */, NULL /* pszFragment */);
    352350    int rc;
    353     if (pszPathURI)
    354     {
    355         rc = AppendURIPath(pszPathURI, fFlags);
    356         RTStrFree(pszPathURI);
     351    char *pszPathNative = RTStrDup(pszPath);
     352    if (pszPathNative)
     353    {
     354        RTPathChangeToUnixSlashes(pszPathNative, true /* fForce */);
     355
     356        char *pszPathURI = RTUriCreate("file" /* pszScheme */, "/" /* pszAuthority */,
     357                                       pszPathNative, NULL /* pszQuery */, NULL /* pszFragment */);
     358        if (pszPathURI)
     359        {
     360            rc = AppendURIPath(pszPathURI, fFlags);
     361            RTStrFree(pszPathURI);
     362        }
     363        else
     364            rc = VERR_INVALID_PARAMETER;
     365
     366        RTStrFree(pszPathNative);
    357367    }
    358368    else
    359         rc = VERR_INVALID_PARAMETER;
     369        rc = VERR_NO_MEMORY;
    360370
    361371    return rc;
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