VirtualBox

Ignore:
Timestamp:
Apr 10, 2019 5:33:18 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129960
Message:

IPRT,*: Added fFlags to RTPathAbsExDup so it matches the new RTPAthAbsEx. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/path/RTPathAbsExDup.cpp

    r78098 r78104  
    3737
    3838
    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)
     39RTDECL(char *) RTPathAbsExDup(const char *pszBase, const char *pszPath, uint32_t fFlags)
    5040{
    5141    char szPath[RTPATH_MAX];
    5242    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);
    5444    if (RT_SUCCESS(rc))
    5545        return RTStrDup(szPath);
     
    5848    {
    5949        size_t   cbPrevPath = sizeof(szPath);
    60         uint32_t cTries = 6;
     50        uint32_t cTries = 8;
    6151        while (cTries-- > 0)
    6252        {
     
    6656            if (pszAbsPath)
    6757            {
    68                 rc = RTPathAbsEx(pszBase, pszPath, RTPATH_STR_F_STYLE_HOST, pszAbsPath, &cbPath);
     58                rc = RTPathAbsEx(pszBase, pszPath, fFlags, pszAbsPath, &cbPath);
    6959                if (RT_SUCCESS(rc))
    7060                    return pszAbsPath;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette