VirtualBox

Changeset 78104 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 10, 2019 5:33:18 PM (6 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/tftp.c

    r76783 r78104  
    142142    else
    143143    {
    144         char *pszFullPathAbs = RTPathAbsExDup(tftp_prefix, (const char*)pcTftpSession->pszFilename);
     144        char *pszFullPathAbs = RTPathAbsExDup(tftp_prefix, (const char *)pcTftpSession->pszFilename, RTPATH_STR_F_STYLE_HOST);
    145145
    146146        if (   !pszFullPathAbs
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r78102 r78104  
    1919#include <iprt/alloca.h>
    2020#include <iprt/path.h>
     21#include <iprt/cpp/path.h>
    2122#include <iprt/dir.h>
    2223#include <iprt/file.h>
     
    23942395 * @param pTargetMedium out: The newly created target medium. This also gets pushed on stack.llHardDisksCreated for cleanup.
    23952396 * @param stack
     2397 *
     2398 * @throws HRESULT
    23962399 */
    23972400void Appliance::i_importOneDiskImage(const ovf::DiskImage &di,
     
    24012404{
    24022405    HRESULT rc;
    2403     char *pszAbsDstPath = RTPathAbsExDup(stack.strMachineFolder.c_str(),
    2404                                          strDstPath.c_str());
    2405     Utf8Str strAbsDstPath(pszAbsDstPath);
    2406     RTStrFree(pszAbsDstPath);
    2407     pszAbsDstPath = NULL;
     2406
     2407    Utf8Str strAbsDstPath;
     2408    int vrc = RTPathAbsExCxx(strAbsDstPath, stack.strMachineFolder, strDstPath);
     2409    AssertRCStmt(vrc, throw Global::vboxStatusCodeToCOM(vrc));
    24082410
    24092411    /* Get the system properties. */
     
    24322434     * the current code can't possibly handle. */
    24332435    RTUUID uuid;
    2434     int vrc = RTUuidFromStr(&uuid, strDstPath.c_str());
     2436    vrc = RTUuidFromStr(&uuid, strDstPath.c_str());
    24352437    if (vrc == VINF_SUCCESS)
    24362438    {
  • 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