Changeset 78090 in vbox
- Timestamp:
- Apr 10, 2019 2:19:04 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129946
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/vbsfpathabs.cpp
r76553 r78090 97 97 { 98 98 #if defined(RT_OS_WINDOWS) 99 /** @todo This code is not needed in 6.0 and later as IPRT translates paths 100 * to \\.\ format if they're too long. */ 99 101 const char *pszPathStart = pszRoot? pszRoot: pszPath; 100 102 … … 182 184 183 185 /* Fallback for the common paths. */ 184 return RTPathAbsEx(pszRoot, pszPath, pszAbsPath, cbAbsPath); 186 187 return RTPathAbsExEx(pszRoot, pszPath, RTPATH_STR_F_STYLE_HOST, pszAbsPath, &cbAbsPath); 185 188 } -
trunk/src/VBox/Main/src-all/SharedFolderImpl.cpp
r76592 r78090 283 283 /* Check whether the path is full (absolute) */ 284 284 char hostPathFull[RTPATH_MAX]; 285 int vrc = RTPathAbsEx(NULL, 286 hostPath.c_str(), 287 hostPathFull, 288 sizeof (hostPathFull)); 285 int vrc = RTPathAbs(hostPath.c_str(), 286 hostPathFull, 287 sizeof(hostPathFull)); 289 288 if (RT_FAILURE(vrc)) 290 289 return setErrorBoth(E_INVALIDARG, vrc, tr("Invalid shared folder path: '%s' (%Rrc)"), hostPath.c_str(), vrc); -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r77910 r78090 8664 8664 */ 8665 8665 char szAbsHostPath[RTPATH_MAX]; 8666 int vrc = RTPathAbs Ex(NULL,aData.m_strHostPath.c_str(), szAbsHostPath, sizeof(szAbsHostPath));8666 int vrc = RTPathAbs(aData.m_strHostPath.c_str(), szAbsHostPath, sizeof(szAbsHostPath)); 8667 8667 if (RT_FAILURE(vrc)) 8668 8668 return setErrorBoth(E_INVALIDARG, vrc, tr("Invalid shared folder path: '%s' (%Rrc)"), aData.m_strHostPath.c_str(), vrc); -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r78072 r78090 7258 7258 7259 7259 strSettingsDir.stripFilename(); 7260 char folder[RTPATH_MAX]; 7261 int vrc = RTPathAbsEx(strSettingsDir.c_str(), strPath.c_str(), folder, sizeof(folder)); 7260 char szFolder[RTPATH_MAX]; 7261 size_t cbFolder = sizeof(szFolder); 7262 int vrc = RTPathAbsExEx(strSettingsDir.c_str(), strPath.c_str(), RTPATH_STR_F_STYLE_HOST, szFolder, &cbFolder); 7262 7263 if (RT_SUCCESS(vrc)) 7263 aResult = folder;7264 aResult = szFolder; 7264 7265 7265 7266 return vrc; -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r77436 r78090 4010 4010 AssertComRCReturn(autoCaller.rc(), VERR_GENERAL_FAILURE); 4011 4011 4012 /* no need to lock since mHomeDir is const */ 4013 4014 char folder[RTPATH_MAX]; 4015 int vrc = RTPathAbsEx(m->strHomeDir.c_str(), 4016 strPath.c_str(), 4017 folder, 4018 sizeof(folder)); 4012 /* no need to lock since strHomeDir is const */ 4013 4014 char szFolder[RTPATH_MAX]; 4015 size_t cbFolder = sizeof(szFolder); 4016 int vrc = RTPathAbsExEx(m->strHomeDir.c_str(), 4017 strPath.c_str(), 4018 RTPATH_STR_F_STYLE_HOST, 4019 szFolder, 4020 &cbFolder); 4019 4021 if (RT_SUCCESS(vrc)) 4020 aResult = folder;4022 aResult = szFolder; 4021 4023 4022 4024 return vrc; -
trunk/src/VBox/Runtime/common/path/RTPathAbsEx.cpp
r78048 r78090 53 53 RTDECL(int) RTPathAbsEx(const char *pszBase, const char *pszPath, char *pszAbsPath, size_t cbAbsPath) 54 54 { 55 #if 155 #if 0 56 56 if ( pszBase 57 57 && pszPath -
trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
r76553 r78090 50 50 { 51 51 char szPath[RTPATH_MAX]; 52 int rc = RTPathAbsEx(pszBase, pszPath, szPath, sizeof(szPath)); 52 size_t cbPath = sizeof(szPath); 53 int rc = RTPathAbsExEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, szPath, &cbPath); 53 54 if (RT_SUCCESS(rc)) 54 55 return RTStrDup(szPath); 56 57 if (rc == VERR_BUFFER_OVERFLOW) 58 { 59 size_t cbPrevPath = sizeof(szPath); 60 uint32_t cTries = 6; 61 while (cTries-- > 0) 62 { 63 cbPath = RT_MAX(RT_ALIGN_Z(cbPath + 16, 64), cbPrevPath + 256); 64 cbPrevPath = cbPath; 65 char *pszAbsPath = (char *)RTStrAlloc(cbPath); 66 if (pszAbsPath) 67 { 68 rc = RTPathAbsExEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, pszAbsPath, &cbPath); 69 if (RT_SUCCESS(rc)) 70 return pszAbsPath; 71 RTStrFree(pszAbsPath); 72 } 73 else 74 break; 75 } 76 } 55 77 return NULL; 56 78 } -
trunk/src/VBox/Runtime/generic/RTPathAbs-generic.cpp
r78048 r78090 40 40 #include "internal/fs.h" 41 41 42 #if 142 #if 0 43 43 44 44 static char *rtPathSkipRootSpec(char *pszCur) -
trunk/src/VBox/Runtime/r3/generic/dirrel-r3-generic.cpp
r76553 r78090 84 84 * This ASSUMES that pThis->pszPath is an absolute path. 85 85 */ 86 int rc = RTPathAbsEx (pThis->pszPath, pszRelPath, pszPathDst,cbPathDst);86 int rc = RTPathAbsExEx(pThis->pszPath, pszRelPath, RTPATH_STR_F_STYLE_HOST, pszPathDst, &cbPathDst); 87 87 if (RT_SUCCESS(rc)) 88 88 { -
trunk/src/VBox/Runtime/r3/nt/dirrel-r3-nt.cpp
r76553 r78090 95 95 * This ASSUMES that pThis->pszPath is an absolute path. 96 96 */ 97 int rc = RTPathAbsEx (pThis->pszPath, pszRelPath, pszPathDst,cbPathDst);97 int rc = RTPathAbsExEx(pThis->pszPath, pszRelPath, RTPATH_STR_F_STYLE_HOST, pszPathDst, &cbPathDst); 98 98 if (RT_SUCCESS(rc)) 99 99 { -
trunk/src/VBox/Runtime/testcase/tstRTPath.cpp
r78048 r78090 267 267 268 268 269 #if 0 269 270 /* 270 271 * RTPathAbsEx … … 398 399 } 399 400 } 401 #endif 400 402 401 403 /*
Note:
See TracChangeset
for help on using the changeset viewer.