Changeset 97417 in vbox
- Timestamp:
- Nov 6, 2022 10:31:19 AM (2 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r97395 r97417 1388 1388 }; 1389 1389 1390 /** Returns the path separator based on \a a_enmPathStyle as a C-string. */ 1391 #define PATH_STYLE_SEP_STR(a_enmPathStyle) a_enmPathStyle == PathStyle_DOS ? "\\" : "/" 1392 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2) 1393 # define PATH_STYLE_NATIVE PathStyle_DOS 1394 #else 1395 # define PATH_STYLE_NATIVE PathStyle_UNIX 1396 #endif 1397 1390 1398 /** 1391 1399 * Class for handling guest / host path functions. -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r97415 r97417 1750 1750 else if (pszSrcName && !pszDstName) /* #2 */ 1751 1751 { 1752 strDstPath += RTPATH_SLASH_STR; 1752 if (!strDstPath.endsWith(PATH_STYLE_SEP_STR(enmDstPathStyle))) 1753 strDstPath += PATH_STYLE_SEP_STR(enmDstPathStyle); 1753 1754 strDstPath += pszSrcName; 1754 1755 } -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r97414 r97417 74 74 #define ISOFILE_FLAG_OPTIONAL RT_BIT(8) 75 75 76 77 /** Returns the path separator based on \a a_enmPathStyle as a C-string. */78 #define PATH_STYLE_SEP_STR(a_enmPathStyle) a_enmPathStyle == PathStyle_DOS ? "\\" : "/"79 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)80 # define PATH_STYLE_NATIVE PathStyle_DOS81 #else82 # define PATH_STYLE_NATIVE PathStyle_UNIX83 #endif84 76 85 77 // session task classes … … 2051 2043 Utf8Str strDstRootAbs = pList->mDstRootAbs; 2052 2044 2053 GuestPath::BuildDestinationPath(strSrcRootAbs, PATH_STYLE_NATIVE, 2054 strDstRootAbs, mSession->i_getGuestPathStyle()); 2055 2056 /* Translate the destination path from the host to a path compatible with the guest. 2057 * strDstRootAbs already is in the destination path style, so just do a path cleanup. */ 2045 /* Translate the destination path to a path compatible with the guest. 2046 * Note: This needs to be done *before* GuestPath::BuildDestinationPath() below! */ 2058 2047 vrc = GuestPath::Translate(strDstRootAbs, 2059 2048 mSession->i_getGuestPathStyle() /* Source */, mSession->i_getGuestPathStyle() /* Dest */, 2060 2049 true /* fForce */); 2050 2051 GuestPath::BuildDestinationPath(strSrcRootAbs, PATH_STYLE_NATIVE, 2052 strDstRootAbs, mSession->i_getGuestPathStyle()); 2053 2054 2061 2055 if (RT_FAILURE(vrc)) 2062 2056 {
Note:
See TracChangeset
for help on using the changeset viewer.