Changeset 78104 in vbox for trunk/src/VBox/Runtime/common/path
- Timestamp:
- Apr 10, 2019 5:33:18 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129960
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp
r78098 r78104 37 37 38 38 39 /** 40 * Same as RTPathAbsEx only the result is RTStrDup()'ed. 41 * 42 * @returns Pointer to the absolute path. Use RTStrFree() to free this string. 43 * @returns NULL if RTPathAbsEx() or RTStrDup() fails. 44 * @param pszBase The base path to act like a current directory. 45 * When NULL, the actual cwd is used (i.e. the call 46 * is equivalent to RTPathAbs(pszPath, ...). 47 * @param pszPath The path to resolve. 48 */ 49 RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath) 39 RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath, uint32_t fFlags) 50 40 { 51 41 char szPath[RTPATH_MAX]; 52 42 size_t cbPath = sizeof(szPath); 53 int rc = RTPathAbsEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, szPath, &cbPath);43 int rc = RTPathAbsEx(pszBase, pszPath, fFlags, szPath, &cbPath); 54 44 if (RT_SUCCESS(rc)) 55 45 return RTStrDup(szPath); … … 58 48 { 59 49 size_t cbPrevPath = sizeof(szPath); 60 uint32_t cTries = 6;50 uint32_t cTries = 8; 61 51 while (cTries-- > 0) 62 52 { … … 66 56 if (pszAbsPath) 67 57 { 68 rc = RTPathAbsEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, pszAbsPath, &cbPath);58 rc = RTPathAbsEx(pszBase, pszPath, fFlags, pszAbsPath, &cbPath); 69 59 if (RT_SUCCESS(rc)) 70 60 return pszAbsPath;
Note:
See TracChangeset
for help on using the changeset viewer.