VirtualBox

Changeset 77860 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Mar 24, 2019 2:38:22 AM (6 years ago)
Author:
vboxsync
Message:

SharedFoldersSvc: Must convert all kinds of slashes in the symlink target when reading it. And When creating a symlink, we must always stat on the link to get the object info we return to the caller. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r77848 r77860  
    17031703        {
    17041704            /* Convert the slashes in the link target to the guest path separator characters. */
     1705            /** @todo r=bird: for some messed up reason, we return UTF-8 here rather than
     1706             * the character set selected by the client.  We also don't return the
     1707             * length, so the clients are paranoid about the zero termination behavior. */
     1708            char ch;
    17051709            char *psz = (char *)pBuffer;
    1706             while (*psz != '\0')
    1707             {
    1708                 if (*psz == RTPATH_DELIMITER)
     1710            while ((ch = *psz) != '\0')
     1711            {
     1712                if (RTPATH_IS_SLASH(ch))
    17091713                    *psz = pClient->PathDelimiter;
    17101714                psz++;
     
    23842388    {
    23852389        RTFSOBJINFO info;
    2386         rc = RTPathQueryInfoEx(pszFullNewPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));
     2390        rc = RTPathQueryInfoEx(pszFullNewPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
    23872391        if (RT_SUCCESS(rc))
    23882392            vbfsCopyFsObjInfoFromIprt(pInfo, &info);
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