VirtualBox

Ignore:
Timestamp:
Feb 20, 2024 3:21:35 PM (9 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Added a ShClTransferTransformPath() function to make the paths more uniform. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp

    r103477 r103480  
    33683368    }
    33693369    return "Unknown";
     3370}
     3371
     3372/**
     3373 * Transforms a path so that it can be sent over to the other party.
     3374 *
     3375 * @returns VBox status code.
     3376 * @param   pszPath             Path to transform. Will be modified in place.
     3377 * @param   cbPath              Size (in bytes) of \a pszPath.
     3378 *
     3379 * @note    Shared Clipboard file paths always are sent over as UNIX-style paths.
     3380 *          Sending over back slashes ('\') could happen on non-Windows OSes as part of a path or file name.
     3381 */
     3382int ShClTransferTransformPath(char *pszPath, size_t cbPath)
     3383{
     3384#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
     3385    RT_NOREF(cbPath);
     3386    RTPathChangeToUnixSlashes(pszPath, true /* fForce */);
     3387#else
     3388    RT_NOREF(pszPath, cbPath);
     3389#endif
     3390    return VINF_SUCCESS;
    33703391}
    33713392
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