Changeset 103480 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Feb 20, 2024 3:21:35 PM (12 months ago)
- Location:
- trunk/src/VBox/GuestHost/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/ClipboardStreamImpl-win.cpp
r100665 r103480 38 38 39 39 #include <VBox/GuestHost/SharedClipboard.h> 40 #include <VBox/GuestHost/SharedClipboard-transfers.h> 40 41 #include <VBox/GuestHost/SharedClipboard-win.h> 41 42 … … 211 212 rc = RTStrCopy(openParms.pszPath, openParms.cbPath, m_strPath.c_str()); 212 213 if (RT_SUCCESS(rc)) 213 rc = ShClTransferObjOpen(m_pTransfer, &openParms, &m_hObj); 214 { 215 rc = ShClTransferTransformPath(openParms.pszPath, openParms.cbPath); 216 if (RT_SUCCESS(rc)) 217 rc = ShClTransferObjOpen(m_pTransfer, &openParms, &m_hObj); 218 } 214 219 215 220 ShClTransferObjOpenParmsDestroy(&openParms); -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
r103477 r103480 3368 3368 } 3369 3369 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 */ 3382 int 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; 3370 3391 } 3371 3392
Note:
See TracChangeset
for help on using the changeset viewer.