Changeset 78090 in vbox for trunk/src/VBox/Runtime/common/path
- Timestamp:
- Apr 10, 2019 2:19:04 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129946
- Location:
- trunk/src/VBox/Runtime/common/path
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.